Answers for "como acrescentar item no array js"

0

como acrescentar item no array js

var numeros = [1, 2, 3];
numeros.push(4);

console.log(numeros); // [1, 2, 3, 4]

numeros.push(5, 6, 7);

console.log(numeros); // [1, 2, 3, 4, 5, 6, 7]
Posted by: Guest on October-13-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language