Online console not recognising my apostrophes

I have started the Introduction to Javascript course. The console.log is not recognising the apostrophy - single or double. I am busy with concatination. My ‘hello’ + ‘world’ prints helloworld and I get an error message.

Can anybody advise. I am working on a Mac with keyboard set to US.

Hello @tag4954582560, welcome to the forums! Are you meaning in the CC learning environment? Could you post a screenshot or post of your code and error?
How to format code in posts:
Click this button:

And type of paste your code in between the back ticks:

Screen Shot 2020-05-02 at 14.06.13

Hello @tag4954582560!! :grinning:

If it is printing helloworld, than it is recognizing your apostrophes and designating that as a string. If it didn’t the computer would read them as variables and an error would appear saying that the variables hello and world had not been defined.

If you are trying to print hello world than you need to include either a space in one of your strings, or a string that only contains a space:

console.log('What\'s' + ' ' + 'up?')

Can you provide the link to the lesson you are on?

1 Like