MDN self-hosted library · e01.org
Local variable / notebook

Local variable

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
let global = 5; // A global variable

function fun() {
  let local = 10; // A local variable
}