Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: clarify process.argv second element
  • Loading branch information
Jeevankumar-S committed Jan 17, 2026
commit 34dc231f489e59fabcb2e599195e001c9057584d
9 changes: 4 additions & 5 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -834,10 +834,8 @@ added: v0.1.27
The `process.argv` property returns an array containing the command-line
arguments passed when the Node.js process was launched. The first element will
be [`process.execPath`][]. See `process.argv0` if access to the original value
of `argv[0]` is needed. The second element will be the path to the JavaScript
file being executed (if a script file is provided). For no-script
execution modes (e.g., `-e`/`--eval`), the second element is the first unconsumed
command-line argument. The remaining elements are additional command-line
of `argv[0]` is needed. If a [program entry point][] was provided, the second element
will be the absolute path to it. The remaining elements are additional command-line
arguments.

For example, assuming the following script for `process-args.js`:
Expand Down Expand Up @@ -4579,6 +4577,7 @@ cases:
[`process.hrtime.bigint()`]: #processhrtimebigint
[`process.kill()`]: #processkillpid-signal
[`process.setUncaughtExceptionCaptureCallback()`]: #processsetuncaughtexceptioncapturecallbackfn
[program entry point]: https://nodejs.org/api/cli.html#program-entry-point
[`promise.catch()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch
[`queueMicrotask()`]: globals.md#queuemicrotaskcallback
[`readable.read()`]: stream.md#readablereadsize
Expand All @@ -4602,4 +4601,4 @@ cases:
[uv_get_constrained_memory]: https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory
[uv_rusage_t]: https://docs.libuv.org/en/v1.x/misc.html#c.uv_rusage_t
[wikipedia_major_fault]: https://en.wikipedia.org/wiki/Page_fault#Major
[wikipedia_minor_fault]: https://en.wikipedia.org/wiki/Page_fault#Minor
[wikipedia_minor_fault]: https://en.wikipedia.org/wiki/Page_fault#Minor