Great and to the point article. Thanks for the brush up. The examples had a great pace to them, but I did want to note that your example on how to find the min of an array (const numbers = [1,3,5,7,9,11]) says that it will return 6 instead of 1
And maybe that is a good thing because I was looking at it over and over until I had to open my console and double check that it should be 1. Haha felt like I was back in school again.
And also, maybe you should include a note about how If initialValue is specified, that also causes currentValue to be initialized to the first value in the array. If initialValue is not specified, previousValue is initialized to the first value in the array, and currentValue is initialized to the second value in the array.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great and to the point article. Thanks for the brush up. The examples had a great pace to them, but I did want to note that your example on how to find the min of an array (
const numbers = [1,3,5,7,9,11]
) says that it will return6
instead of1
And maybe that is a good thing because I was looking at it over and over until I had to open my console and double check that it should be
1
. Haha felt like I was back in school again.And also, maybe you should include a note about how If
initialValue
is specified, that also causescurrentValue
to be initialized to the first value in the array. IfinitialValue
is not specified,previousValue
is initialized to the first value in the array, andcurrentValue
is initialized to the second value in the array.