Loops in Javascript

PHOTO EMBED

Wed Jun 28 2023 01:30:09 GMT+0000 (Coordinated Universal Time)

Saved by @gbritgs #javascript

const arr = ["1", "2", "3"];

for(let cont of arr) {
  console.log(cont);
}


const arr = [
  {
    name: '1',
    agr: 2
  },
  {
    name: '1',
    agr: 2
  }
];

for(let cont of arr) {
  console.log(cont.name);
}
content_copyCOPY