js array add element
array.push(element)
pushing to an array
array = ["hello"]
array.push("world");
console.log(array);
//output =>
["hello", "world"]
javascript array push
var SomeRandomArray = [];
SomeRandomArray.push("Hello, world!");
js push array
var array = [];
var element = "anything you want in the array";
array.push(element); // array = [ "anything you want in the array" ]
.push js
let monTableau2D = [
['Mark' , 'jeff' , 'Bill'] ,
['Zuckerberg' , 'Bezos' , 'Gates']
] ;
monTableau2D[1].push('test') ;
console.log(monTableau2D) ;
//////////////////
let monTableau = ['un', 'deux','trois', 'quatre'] ;
monTableau.push('cinq') ;
console.log(monTableau) ;
///////////////////
let monTableauAssociatif = {
'prenom' : 'Mark' ,
'nom' : 'Zuckerberg' ,
'poste' : 'Pdg de Facebook',
} ;
monTableauAssociatif['nationalite'] = 'Américaine' ;
console.log(monTableauAssociatif) ;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us