Q:

can we push or pop a name from middle of the array

var suits = ["hearts", "clubs", "Brooks Brothers", "diamonds", "spades"];

suits.splice(2, 0, "Brooks Brothers");

console.log(suits);
0

New to Communities?

Join the community