Answers for "how to find length of array in javascript without using length method"

0

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
Posted by: Guest on March-18-2021

Code answers related to "how to find length of array in javascript without using length method"

Code answers related to "Javascript"

Browse Popular Code Answers by Language