1var numbers = [1, 2, 3, 4, 5];
2var length = numbers.length;
3for (var i = 0; i < length; i++) {
4 numbers[i] *= 2;
5}
6// numbers is now [2, 4, 6, 8, 10]
7
1var arr = [10,20,30,40,50]; //An Array is defined with 5 instances
2
3var len= arr.length; //Now arr.length returns 5.Basically, len=5.
4console.log(len); //gives 5
5console.log(arr.length); //also gives 5
1
2const fruits = ["Banana", "Orange", "Apple", "Mango"];
3
4fruits.length // Returns 4
5
1 var x = [];
2 console.log(x.size());
3 console.log(x.length);
4 console.log(x.size()==x.length);
5 x =[1,2,3];
6 console.log(x.size());
7 console.log(x.length);
8 console.log(x.size()==x.length);
9//arjun