How to Write Multiple Lines in the Chrome Console

If you want to write multiple lines of commands in the Chrome console, first open the console (CMD + Shift + J on Mac / CTRL + Shift + J on Windows). Now while inside the Console, write any line of code, and then hold down Shift + Enter.

Now you can write on the new line without executing the previous line (as you do when you don’t hold down shift). When you want to run all your code, hit Enter at the end of your script (last line of code).


Has this been helpful to you?

You can support my work by sharing this article with others, or perhaps buy me a cup of coffee 😊

Kofi

Share & Discuss on