Similar to the 'push' method, the 'unshift' method is used to add a new element to the very beginning of the Array, rather than the back as with 'push'. It also returns the new length of the array after the addition operation.
In this video see it in action.
For your reference:
https://developer.mozilla.org/en-US/d...
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
On this page of the site you can watch the video online Array 'unshift' method in Javascript (Array.prototype.unshift) with a duration of hours minute second in good quality, which was uploaded by the user dcode 24 December 2017, share the link with friends and acquaintances, this video has already been watched 1,342 times on youtube and it was liked by 31 viewers. Enjoy your viewing!