Web
the scope of var variable in JS
Output: Here are two same variable declaration in the nested for loop. But the second var i will overlay rewriting the first one.So the sum contains only the first row values in the following example. We can use let instead of var for i when declare them in the nested for loop Read more…