Learn Introductory JavaScript by Building a Pyramid Generator - Step 13

Tell us what’s happening:

Hi
Please ca someone help me? I don’t understand why I made it wrong. Thanks in advance

let number ;
number = 8 ;
let count+1 ;
count+1 = “number” + 1 ;
console.log(“count+1”)

Your code so far


// User Editable Region

let number ;
number = 8 ;
let count+1 ;
count+1 = "number" + 1 ;
console.log("count+1")

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 13

Hi there! In this step you have to print count + 1 to the console, nothing more.
Reset the task and try again

2 Likes

Welcome to the forum!

There are some issues with your code:

  • Variable names can only contain alphanumerical characters and underscores. Correct would be let countPlus1
  • You turned number into a string in the variable assignment
    Your code would work like this:
Let countPlus1 = number + 1
console.log(countPlus1)

You however don’t need that much code to solve the task, just follow Ray’s hint.

2 Likes

Oh! Thank you so much! I’m so stupid jaja

1 Like

Oh yes, it was asking more basic thing. I thought unnecessarily complicated. Thank you so much.