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

JavaScript Regular Expressions in JavaScript Validating a Form Flags

How did he create a new line in the console?

How did he create a new line in the console when he talked about the const treat =cheese cheese cheese example. Hitting enter didn't work for me...

2 Answers

because he's using backticks

Awesome, thank you!

Christopher Wester
seal-mask
.a{fill-rule:evenodd;}techdegree
Christopher Wester
Full Stack JavaScript Techdegree Student 4,058 Points

Using backticks changes the behavior of the Enter key, so that the cursor moves to a new line in the console instead of submitting the code to try to run it.

Alternatively, if you want to move to a new line without using backticks, you can press Shift + Enter. I find this useful, when I want to make a visual separation in my writing. This keyboard shortcut works in other applications as well.