Shortening a variable name?

Hi! so my question is with this example given in the JS iterators lesson, the variable named “words” declared with const at the start is then changed in the code block to only say “word”, the program still accepts this as valid, but i don’t understand why. shouldn’t any modification to the variable name render it meaningless? why is this allowed, maybe just a typo?


const words = [“unique”, “uncanny”, “pique”, “oxymoron”, “guise”];

// Something is missing in the method call below

words.some((word) => {
return word.length < 6;

“word” is being used as an element. “Words” is being used correctly here as it is calling the “some” method and using the “word” element to return the result of the string length condition in the “words” array.

In short “words” is never being modified through the some() method.

Here is a link to the documentation for the some() method:
Array.some() doc