DEV Community

Cover image for Top 30 Javascript Interview Warmup Exercises Part 2

Top 30 Javascript Interview Warmup Exercises Part 2

Theofanis Despoudis on January 18, 2020

Read the original in CodeThat.today Welcome back. Here is the second part of the series about the top 30 Javascript Interview Warmup Exercises. If...
Collapse
 
q3flat profile image
q3flat

If you want to check whether is a number prime or not, you just have to go up to sqrt(n).

Collapse
 
1baga profile image
1baga

Please kindly explain

Collapse
 
cyuste profile image
Info Comment hidden by post author - thread only accessible via permalink
cyuste

I think that in the first exercise it should be better to make a special case 2 too and then iterate from 3 incrementing 2 by 2. It shows that you don't only know how to code but basic math too ;)

Some comments have been hidden by the post's author - find out more