Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Level 11 lesson 3 Please Help

I get the answer right when I hut Run.
But shows "log the value of array on console"
<!doctype html>
<html>
<head>
<title>JS Array Operations</title>
</head>
<body>
<script>
let numbers = [1, 22, 333, 4444];
// perform operations
numbers.reverse().pop();
numbers.reverse().push(55555);
document.write(numbers);
</script>
</body>

</html>

It gives me "22,333,4444,55555" which is the req output.
Help if someone knows what's wrong
by

1 Answer

RajKumar37x8r
try this!
<!doctype html>
<html>
<head>
<title>JS Array Operations</title>
</head>
<body>
<script>
let numbers = [1, 22, 333, 4444];
// perform operations
numbers.reverse().pop();
numbers.reverse().push(55555);
console.log(numbers);
</script>
</body>
</html>

Login / Signup to Answer the Question.