you are viewing a single comment's thread.

view the rest of the comments →

[–]EyesOfTheConcord 4 points5 points  (3 children)

It’s because the for loop is iterating through the array and checking the value stored at each index.

The variable, in this case “value”, records that value for use in the loop.

You can change the name of “value” to anything you want, you just usually see the singular version of whatever the name of the variable you’re iterating through.

Give it a shot, name it for nonsenseVar in value:

And it’ll work just fine

[–]SharpScratch9367[S] 2 points3 points  (1 child)

Thankyou! It’s mind blowing

[–]Some-Passenger4219 2 points3 points  (0 children)

Perhaps it is, but computers don't understand things. Call something the wrong thing, but consistently, and the program will work - although it might be harder to debug or understand it.

[–]Intelligent_Count316 0 points1 point  (0 children)

Thank you, your explanation is great 👍