loading...

re: Understanding Javascript Array Series IX - Array Loops & Iteration Part VI VIEW POST

FULL DISCUSSION
 

Thank you for sharing this insight on JavaScript array 'some' method.

After your first snippet of code, I noticed that you wrote that 'This loop runs until the test case passes.'
Actually, the loop runs until the test case passes or fails.

Also, do you think more comments on our code may speed up understanding? For example, a comment in the first snippet telling us that we are looping through to check for prime characteristics may help me the reader to quickly get what the code does.

Great effort!

code of conduct - report abuse