js let vs var performance code example
Example: 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."
*/