What's wrong with this piece of code?


I am on Learn JacaScript, exercise 4: Math Operators, #2

The first exercise asks you to add 3.5 to your age using console.log, and I entered
and it worked. The second exercise asks you to subtract 1969 from 2017 using console.log, and I entered
and it didn't work. I've run it many times and it says "It has been 48 years since the 1969 moon landing. Did you log that answer to the console?" I don't know what's wrong.



I added ; on the end of both pieces and console.log('19+3.5'); still worked while console.log('2017-1969'); still didn't.


we use ' ' for string

remove the ' ' to get the result


Thank you so much! That fixed it :slight_smile:


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