Answers for "access variable outside for loop javascript"

1

access variable outside for loop javascript

var x = [];
var y = [1,2,3,4]// see the change here
    
var i;
for (i = 0; i < y.length; ++i) {
    x.push(y[i]); // push every element here
}
console.log(x);
Posted by: Guest on September-17-2021

Code answers related to "access variable outside for loop javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language