for of loop

PHOTO EMBED

Fri Sep 16 2022 13:15:49 GMT+0000 (Coordinated Universal Time)

Saved by @sreejithbs

const countries = ['Finland', 'Sweden', 'Norway', 'Denmark', 'Iceland']
const newArr = []
for(const country of countries){
  newArr.push(country.toUpperCase())
}

console.log(newArr)  // ["FINLAND", "SWEDEN", "NORWAY", "DENMARK", "ICELAND"]
content_copyCOPY

https://github.com/Asabeneh/30-Days-Of-JavaScript/blob/master/06_Day_Loops/06_day_loops.md