const arr = []
console.log(arr.length)
> 0
const arr2 = ['banana', 'orange']
console.log(arr2.length)
> 2
const arr3 = ['banana', 'orange', '']
console.log(arr3.length)
> 3
const arr4 = [null]
console.log(arr4.length)
> 1
const arr5 = [{}]
console.log(arr5.length)
> 1
const arr6 = [[]]
console.log(arr6.length)
> 1
const arr7 = [undefined]
> 1
const arr8 = ''
console.log(arr8.length)
> 0
const arr9 = 'aaa'
console.log(arr9.length)
> 3
const arr10 = 1
console.log(arr10.length)
> undefined
const arr11 = {}
console.log(arr11.length)
> undefined
const arr12 = null
console.log(arr12.length)
> Uncaught TypeError: Cannot read properties of null (reading'length')
const arr13 = true
console.log('arr13', arr13.length)
> undefined
const arr14 = false
console.log('arr14', arr14.length)
> undefined
https://codepen.io/masanos/pen/wvXYLxp
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length