safari and chrome javascript console multiline

Shift-Enter on Windows allows multi-line entry where Option-Enter works on Mac.

A more fully featured editor is in the works.


For Google Chrome, you can Sources >> Snippets >> + New Snippet in the Developer Console.

enter image description here

Once you have written your multi-line code, you can execute it with the enter image description here button or with Ctrl + Enter as mentioned on the button.

This is like a text-editor which has a host of keyboard shortcuts which you can find under Settings >> Shortcuts under Text Editor

enter image description here

Good Luck.