Skip to content
Advertisement

Does internet speed afect browser JavaScript?

I wanted to know if browser speed affects the execution time of JavaScript code. For example, if I have this code

for (let i = 0; i <= 100; i++){
   console.log(i)
}

Does it mean that someone with a 4G connection will get this code executed earlier than someone with a 2G connection

Advertisement

Answer

No, as I understand it, Java Script is run in your browser and your browser have engine to run java script.

Only thing that connection speed can affect is request/response cycle; download of files sent from server…. (html, css, js files…)

Hope this explanation helps?

Advertisement