let num = [ 3, 23 , 1 , 2 ,6]
for (let i = 0 ; i <num.length;i++){
console.log(num[i])
}
// For Each loop
num.forEach((element) => {
console.log(element * element)
})
// Array.from -> used to create array from any other object like html object
// Used in html to go throuh html Collection - . document.getElecmentbyCLassName("input")
let userName = "kalyan";
let arr = Array.from(userName);
console.log(arr)
// for of -> easier way
for (let i of num) {
console.log(i)
}
// for in
for (let i in num) {
console.log(i) // giving indexes
// array is object with keys 0,1,2,3 and values are array elements
// on object in prints keys
}