arr.length method

1) How to find length of an array 

 // array.length

// 0 1 2 3 4 5
const arr = ['A', 'B', 'C', true, 20, 'xyz'];

console.log(arr);

// length of Array = last index + 1
// = 5+1 => 6

console.log(arr.length); // 6

===============================================================================================
TERMINAL:








Comments