TypeScript Array unshift() - TypeScript

What is TypeScript - Array unshift()?

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


Parameter Details

Return Value

Returns the length of the new array. It returns undefined in IE browser.


On compiling, it will generate the same code in JavaScript.

Its output is as follows −

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

TypeScript Topics