Learn Introductory JavaScript by Building a Pyramid Generator - Step 19

Tell us what’s happening:

The instructions for the exercise are to declare an array variable with 3 elements in this array.
I feel like I’m following the instructions and yet I’m still failing.
The error message tells me that Naomi should be my first item, Quincy the second, CamperChan the third.
It seemed to me that this is what I declared… Can you help me?

Instructions : # Step 19
When an array holds values, or elements, those values are separated by commas. Here is an array that holds two strings:
Example Code

let array = ["first", "second"];

Change your rows declaration to be an array with the strings "Naomi", "Quincy", and "CamperChan". The order of values in an array is important, so follow that order. Remember that strings are case-sensitive.

Your code so far


// User Editable Region

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

// User Editable Region

###Error message :
The first element in your array should be the string “Naomi”
The second element in your array should be the string “Quincy”
The third element in your array should be the string “CamperChan”

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 19

The instructions were:
Change your rows declaration to be an array

But you deleted the rows declaration completely instead of just changing it.

To fix it, rename your array back to rows.

1 Like

Thanks a lot, I thought I had to write as the exemple !
Each mistake = a lesson :slight_smile:

1 Like