Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript performance difference with time(int) declaration?

Tags:

javascript

What it is the difference in having:

setInterval(function(){

},5000);

and:

setInterval(function(){

},5E3);

I know that 5E3 is like saying 5*1000 but is there is any benefits one from another way to declare times?

like image 932
Jorge Y. C. Rodriguez Avatar asked Mar 14 '26 16:03

Jorge Y. C. Rodriguez


1 Answers

No, there's no difference, as both literals are parsed into the same primitive number.

like image 98
Denys Séguret Avatar answered Mar 16 '26 05:03

Denys Séguret