J
J
JackShcherbakov2017-11-03 08:14:42
JavaScript
JackShcherbakov, 2017-11-03 08:14:42

Why does the 1st array element have index 1 in the MDN documentation?

I read a guide for understanding reduce in JS
In general, in this article there are 2 tables, in the 1st for some reason the index of the 1st element is 1! Is this a bug or am I misunderstanding something? It is important to note that everything seems to be in order in the second table.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2017-11-03
@JackShcherbakov

If the initialValue argument is not given, then the value of accumulator will be equal to the first value in the array, and the value of currentValue will be equal to the second value in the array.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question