Question:Briefly describe JavaScript core Array method push() with an example.
Answer Array.push() method add a value to the end of the array (top of the stack) and leaves it there.Example:
var stackWork=new Array("Lenny","Harold","Mary","Jean","Sal"); stackWork.push("Delia"); document.write(stackWork);Output: Lenny,Harold,Mary,Jean,Sal,Delia
+ Report
Briefly describe JavaScript core Array method push() with an example.