Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

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');

Theo VOGLIMACCI
Theo VOGLIMACCI
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