JS: How to Use Browser Console

By Xah Lee. Date: . Last updated: .

What is browser console

Browser console is tool in browser that lets you view and edit JavaScript, HTML, CSS.

A easy way to try JavaScript code is to use browser's JavaScript console, usually under a menu named Developer Tool.

Google Chrome Browser

On Google Chrome browser for Windows: Press F12 or Ctrl+Shift+i to toggle JavaScript console.

On macOS ⌘ command+⌥ option+i

chrome js console 2019-06-12 88y88
Google Chrome browser JavaScript console 2019-06-12

Firefox

firefox console 2018-08-25 b4dc7
Firefox console 2018-08-25
Firefox web dev tool 2014-08-28
Firefox web dev tool 2014-08-28

Safari

In Safari, first turn on Develop menu.

safari turn on web console 2017 09 24 85788
in Safari, to turn on Develop menu, go to Safari Preferences, Advanced tab.

then press ⌘ command+⌥ option+i to toggle the JavaScript console.

sarari web dev console 2019-06-11 dnryw
Sarari web dev console 2019-06-11