Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Marina Emmatty
Marina Emmatty
620 Points

i tried running console.log ('hello world"); in the console...but there was no output in console ....

i dont understand why there was no output on writing node app.js in console

3 Answers

Boonsuen Oh
Boonsuen Oh
18,788 Points

console.log('hello world');

8,027 Points

Your code always need to be console.log('STRING'); Always use same pair of ' ' or " " or it won't work. If you'r string contain a ' like this one : John's house, you'll need to type it this way : "John's House" or 'John\'s House'.

Work well and happy coding!

You can use either double quotes or single quotes, but you can't start the string with a single quote and end it with a double quote. Examples:

"Hello"  // This string is valid
'Hello'  // This string is valid
"Hello'  // This string is invalid
'Hello"  // This string is invalid