push()

An Array method that adds values to the end and returns the new length.

What does push() do in JavaScript?

push() — An Array method that adds values to the end and returns the new length.

const tasks = ["Test"];
tasks.push("Deploy");

Level: Apprentice · More JavaScript terms at this level

Updated