Development Tools Website Optimization Chrome DevTools Basics The Profiles Panel

How to tab down to next line in Console without running the code?

Confused about Console: When I try to copy what Nick writes in Console for the loop test, I am unable to write the code and drop a curly bracket to the next line using the enter key. It executes the code and gives me an error. "Uncaught SyntaxError: Unexpected end of input"

What am I doing wrong? Thx

3 Answers

Try entering a backslash \ at the end of the line before pressing return.

Ben Spears
Ben Spears
19,140 Points

Shift+return is the way to go.

You can also just type the code in some text editor and paste it into the console.