Skip to content

Commit 689c90f

Browse files
Clarify command line argument indexing in part9b.md
Added note about command line argument indexing. Spent a day wondering why my ex. 9.3 code didn't work, so I thought this change to the material might help the students in the future.
1 parent 7599b17 commit 689c90f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/content/9/en/part9b.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ The reason for this is, that *Number('lol')* returns *NaN*, which is actually of
377377

378378
To prevent this kind of behavior, we have to validate the data given to us from the command line.
379379

380+
(Note that command line arguments start from process.argv[2], as index 0 is the Node binary path and index 1 is the script path.)
381+
380382
The improved version of the multiplicator looks like this:
381383

382384
```js

0 commit comments

Comments
 (0)