let global = 5; // A global variable
function fun() {
let local = 10; // A local variable
}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.