What's Wrong With This Code?


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

https://www.codecademy.com/courses/learn-javascript/lessons/variables/exercises/create-a-variable-ii?action=lesson_resume
<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

Did you set the age variable equal to a number?



var age = '20';



#2

Hey @thomascogliandro :smiley:
So what you did was actually a string value, not a number/integer one. It’s detonated as a string data type since of the ’ ’ quotation marks.
Therefore, just remove those and you’ll have a number data type.

I really hope this helps!!!


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.