Answers for "The unshift() method adds one or more elements to the beginning of an array and returns the new length of the array."

10

unshift method in javascript

var name = [ "john" ];
name.unshift( "charlie" );
name.unshift( "joseph", "Jane" );
console.log(name);

//Output will be
[" joseph "," Jane ", " charlie ", " john "]
Posted by: Guest on August-02-2020

Code answers related to "The unshift() method adds one or more elements to the beginning of an array and returns the new length of the array."

Code answers related to "Javascript"

Browse Popular Code Answers by Language