Learn Introductory JavaScript by Building a Pyramid Generator - Step 20

Tell us what’s happening:

How do I use console.log and bracket notation to print the first value to rows

Your code so far


// User Editable Region

let character = 'Hello';
let count = 8;
let rows = ["Naomi", "Quincy", "CamperChan"];


// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (iPhone; CPU iPhone OS 17_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Mobile/15E148 Safari/604.1

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 20

Hi @BradenData

You can access the value using bracket notation, such as array[0].

Use console.log and bracket notation to print the first value in your rows array.

The hint message sugggests:

  1. You should have a console.log() statement in your code.

Type console.log then parentheses. Inside the parentheses add the code using bracket notation.

Happy coding