Arrays

// Arrays

var myArray = [];

// adding an element to the array
myArray.push(1);

// print the array:
console.log(myArray);

// add another element
myArray.push(5);

// print array
console.log(myArray);

// pop an element

myArray.pop(1);

Comments

Popular posts from this blog

Lesson 2 Chat