Thursday , September 19 2024

Analyze the following code: let colors = [‘red’, ‘green’, ‘blue’]; for (let c of colors) console.log(c); What will appear on the console as a result?

Questions BankCategory: JavaScript Essentials 1Analyze the following code: let colors = [‘red’, ‘green’, ‘blue’]; for (let c of colors) console.log(c); What will appear on the console as a result?
Analyze the following code:

let colors = ['red', 'green', 'blue'];
for (let c of colors) console.log(c);

What will appear on the console as a result?

  • red green blue
  • 0 1 2
  • ['red', 'green', 'blue']
  • 3

More Questions: JavaScript Essentials 1 – JSE1: Final Test