Basic JavaScript - Manipulate Arrays With unshift Method

Tell us what’s happening:

Describe your issue in detail here.Skip to content

Menu
Profile
JavaScript Algorithms and Data Structures
Basic JavaScript
Instructions
Code
Console
// running tests
myArray should now have [[“Paul”, 35], [“dog”, 3]].
// tests completed
Help
Navigated to Manipulate Arrays With unshift Method

Your code so far

// Setup
var myArray = [["John", 23], ["dog", 3]];
myArray.shift();

// Only change code below this line
myArray.shift();
myArray.unshift(["paul",35]);

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 9; vivo 1921) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36

Challenge Information:

Basic JavaScript - Manipulate Arrays With unshift Method

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

why do you use shift twice?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.