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!
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.
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!