unshift() & shift() #javascript

preview_player
Показать описание
#javascript #coding #tutorial #shorts #asmr

shift(): removes the first element of an array and the return value is the removed element.

unshift(): adds a specified element or elements to the beginning of an array and the return value is the new length of the array.

Please review the MDN docs on shift() and unshift() for additional information.
Рекомендации по теме
Комментарии
Автор

shift(): removes the first element of an array and the return value is the removed element.

unshift(): adds a specified element or elements to the beginning of an array and the return value is the new length of the array.

theengineeringnotes
welcome to shbcf.ru