Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
 
PREVIOUS NEXT
Tagged: #find #length #array #javascript #length #method
ADD COMMENT
Topic
Name
1+9 =