how to check the length of an array without error in javascript code example
Example: how to find length of array in javascript without using length method
let array = [1, 5, 6, true, "string", ["subarray", 5], 6];
let length = 0;
for (let i of array){
length++;
}
console.log(length)
// 7