Array length let var x=[1,2,3,4] console.log(x.length) // 4 Normally we think the length of an array will be the number of items in the array. But it’s not true all time. Lets clear with an example: x.[100]=21; console.log(x.length) // 101 In this case length of the array is 101 but we see…