Using the methods you have learned, modify the xMen array already declared in the editor so that only members of the X-Men are present. os metodos que eu aprende sao: pop() and push().
Then add all of the mutants present in the xMen array to the freelancers array.
veja o que eu fiz
var xMen = ['Professor X', 'Cyclops', 'Beast', 'Iron-Man', 'Hobgoblin'];
var freelancers = ['Legion', 'Magneto'];
xMen.pop(3);
xMen.pop(4);
for (i=0;i<xfreelancers.push;i++) {
console.log (freelancers[i]);
}
olha o erro:
Code is incorrect
There should be a for loop to add the elements to the freelancers array
Legion
Magneto
undefined