I am having one question from one challenge that is puzzling me.
In the code below, why arr does not represent all arguments “[1, 2, 3, 1, 2, 3], 2, 3” as a 2-D array?
Instead, arr below only represents [1, 2, 3, 1, 2, 3].
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
the first argument is stored in the first parameter, the second argument in second parameter, etc
in this case only one parameter is present, but three arguments, so only first argument is stored in a parameter, the others you will have to access in other way
Thank you for the explanation.
This is a bit puzzling since it is not often seen.
Usually the number of arguments match the ones of parameters.
So the comma is the delimiter to define each individual argument I assume.
The single parameter does not take whole arguments as a 2-D array one.