I've been coming across some interview questions that mention within the question "... given an integer x and a zero-indexed array..." Is it necessary to mention zero-indexed array? What languages support non-zero-indexed arrays? Is it possible with javascript?
put on hold as too broad by gnat, Ixrec, Scant Roger, Snowman, MichaelT Dec 14 at 4:07There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question. |
|||||||||||||
|
An array in Javascript can be sparse where only some elements exist and the first element that exists does not have to be at index
It's not really necessary in Javascript since that is the default expectation, but does confirm that whatever values you are expecting in the array will start at the |
|||
|