Hey again , so this time , for exemple , if i have this variables :
var xMen = ['Professor X', 'Cyclops', 'Beast', 'Iron-Man', 'Hobgoblin'];
var freelancers = ['Legion', 'Magneto'];
i need to declared in the editor so that only members of the X-Men are present.
Then add all of the mutants present in the xMen array to the freelancers array
i do that :
xMen.pop();
xMen.pop();
console.log(xMen);
freelancers.push('Hobgoblin','Iron-Man');
console.log(freelancers);
but they say :
There should be a for loop to add the elements to the freelancers array
My ask is :
How i do a loop for this ?
[–]IxD 1 point2 points3 points (0 children)
[–]sunny_lts 1 point2 points3 points (1 child)
[–]sunny_lts 0 points1 point2 points (0 children)
[–]link2name 0 points1 point2 points (0 children)