Answers for "js let vs var performance"

0

js let vs var performance

let;  // Local scope only. Only visible in the scope it is declared in.
var;  // Function scope.
	  // Visible in the entire function, even if declared in a for loop.

/*
"After testing this in Chrome and Firefox, this shows that let is faster 
than var, but only when inside a different scope than the main scope of a 
function. In the main scope, var and let are roughly identical in 
performance. In IE11 and MS Edge, let and var are roughly equal in performance 
in both cases."
*/
Posted by: Guest on March-19-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language