Arrays practice

 let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

console.log(arr);

console.log(arr.toString());

// convert into string


console.log(arr.join(" and "));


console.log(arr[1]);

arr.pop();

console.log(arr);

console.log(arr.length);

arr.push(13);

arr.shift();

arr.unshift(11);

console.log(arr);


Comments

Popular posts from this blog

practice test of Arithmetic Operations: