argc parameter (Definition)

A command line argument count.

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 argc property, which indicates how many arguments have been passed.

In general, the first argument is the name of the script or program being executed. The argc value should never be zero and as a minimum should indicate that there is at least one argument.

The actual values of the arguments are collected in an array called argv. You should be able to access argv and argc in a similar manner.

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