Learn Introductory JavaScript by Building a Pyramid Generator - Step 21

Tell us what’s happening:

Hey,

I am not sure why my code isnt being accepted? I listed all the elements, declared the array change to the number 10. I am logging the console to array. Am I missing something here? LOL. Ive looked at others and it seems this is a common issue. Please help <3

Your code so far:

let array = [“Naomi”, “Quincy”, “CamperChan”];
array[2] = 10;
console.log(array); // prints [“Naomi”, “Quincy”, 10]

it looks like you removed important parts from the template, please add again the step link and format your code properly

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Welcome to the forum @toniiicodes

image

You are using the variables from the examples.
You need to use the ones from the instructions, which are below the example code.

Happy coding

1 Like