argv parameter (Definition)

A command line argument collection.

Since JavaScript can be used in many environments, it is possible that in a server side application you will have access to the command line arguments.

If that is the case, then it is likely that you will have an argv property, which contains the argument values.

In general, the first argument is the name of the script or program being executed.

To establish the length of the argv array, you can inspect the argc value.

The values passed in the argv array are likely to be presented as strings, although they may be automatically cast to number, Boolean or other types without you needing to perform any type conversion yourself.

Warnings:

See also:argc parameter, Execution context, Execution environment, Host environment, Host object, main() function