
array.push() – Adds one or more elements to the **end** of an array and returns the new length.
๐ Syntax
newLength = array.push(element1, ...);
๐งช Example
const arr=[1]; arr.push(2,3); // arr=[1,2,3]
array.push() – Adds one or more elements to the **end** of an array and returns the new length.
newLength = array.push(element1, ...);
const arr=[1]; arr.push(2,3); // arr=[1,2,3]
Comments
Post a Comment