setInterval(clock, 1000 / 100);
Is there any reason for writing 1000/100 instead of 10?edit: Thanks guys!
setInterval(clock, 1000 / 100);
Is there any reason for writing 1000/100 instead of 10?edit: Thanks guys!
The usefulness is more obvious when you want 60FPS, which is not easily represented without rounding.
Similarly, people will write (10 * 60 * 60) if the value is seconds and the programmer intends to indicate 10 hours.