How to input multiple lines of code in Chrome DevTools console.

Method 1: Use special Newline character

When you want to create a new line in Chrome DevTools console, instead of Enter, you should press shift + Enter.

Method 2: copy & paste

In your normal text editor like vscode or notepad, input multiple lines as usual. Then copy the text and paste into Chrome DevTools console.

Posted on 2023-04-14