Global Scope

Variables declared Globally (outside any block or function) have Global Scope.

Global variables can be accessed from anywhere in a JavaScript program.

Variables declared with var, let and const are quite similar when declared outside a block.

They all have Global Scope:

var x = 1; // Global scope

let y = 2; // Global scope

const z = 3; // Global scope

Example

A variable declared outside a function, becomes GLOBAL. let carName = "Volvo"; // code here can use carName

function myFunction() { // code here can also use carName }

Function Scope

All JavaScript functions have their own scope.

Variables defined inside a function are n...

jun 9 2026 ∞
jun 9 2026 +
  • Finding Nemo
  • The Lion King
  • Lady And The Tramp
  • Good Boy
jun 8 2026 ∞
jun 8 2026 +
  • Prince
  • Butter
jun 8 2026 ∞
jun 8 2026 +
  • drowning
  • leaving my house
  • Vomit / Seeing Vomit / Vomitting Myself / Etc.
  • Wasps
jun 8 2026 ∞
jun 8 2026 +
  • Lions
  • Cats
  • Dogs
  • Wolves
  • Foxes
  • Isopods
  • Worms
  • Slugs
  • Tigers
  • Hyenas
  • Hares and Rabbits
jun 8 2026 ∞
jun 8 2026 +
list icon
  • replace this text with your list
  • begin each item with an asterisk
  • aa
  • aaaaa
jan 28 2019 ∞
jan 28 2019 +

<button>Change color</button>

const btn = document.querySelector("button");

function random(number) { return Math.floor(Math.random() * (number + 1)); }

btn.addEventListener("click", () => { const rndCol = `rgb(${random(255)} ${random(255)} ${random(255)})`; document.body.style.backgroundColor = rndCol; });

  • The HTML <button> element will fire a click event when the user clicks it. We call the addEventListener() method on it to add an event listener; this takes two parameters:

the string "click", to indicate that we want to listen to the click event. Buttons can fire lots of other events, such as "mouseover" when the user moves their mous...

jun 9 2026 ∞
jun 9 2026 +
  • Barbie Zoom & Groom
  • Barbie Pet Dance
  • Barbie Care N Cure
  • Barbie Snip & Style Salon
  • Monster High Create A Monster
  • Monster High CasketBall Queen
  • Bratz Makeover
  • Bratz Love Meter
  • Pony Creator V3 By General Zoi
  • Adventures In Ponyville
  • Nickelodeon Clickamajigs
  • Dora's Fairytale Fiesta
  • Dora's Pirate Boat Treasure Hunt
  • Dora's Puppy Adventure
  • Dora's Mermaid Adventure (2008)
  • Dora's Number Pyramid Adventure!
  • Bella Sara
  • Cartoon Studio (PBS kids)
jun 8 2026 ∞
jun 8 2026 +
  • Litten
  • Sprigatito
  • Meowscarada
  • Scorbunny
  • Evee
  • Sylveon
  • Glaceon
  • Pombon
  • Meowth
jun 8 2026 ∞
jun 8 2026 +
  • Bocchi (Bocchi the rock)
  • Tomoko (Watamote)
  • Jinx ( League Of Legends / Arcane )
  • Sarah Lynn (Bojack Horseman)
  • Nazuna (BNA)
  • Mikan Tsumiki (Danganronpa)
  • Shuichi Saihara (Danganronpa)
  • Luz (The owl house)
  • Fluttershy (MLP)
  • Rarity (MLP)
  • Sailor Venus ( Sailor Moon)
jun 8 2026 ∞
jun 8 2026 +
  • me and the wolf pup following eachother back and forth through the glass when i was a little kid.
  • When I met my girlfriend, Middleschool was bad but when she sat next to me behind the vending machine it changed the course of my life in such a great way.
  • Playing w/ my toys, LPS, Barbie, Bratz and Monster High.
  • Wrestling with my sister on the trampoline
  • Getting Bit By a wasp on the trampoline
  • My First Date With My Girlfriend, We saw a movie called "Every Day" With a character who switched bodies every single day. I treasure this movie. She tried to kiss me, I was too shy about it at the time.
  • Video Editing on Video Star while I was 9-10 and then again when i was 15-19
  • Getting lucky at the claw machine at galaxy land and getting a GIANT unicorn plush...
jun 8 2026 ∞
jun 8 2026 +

- Katy Perry

- Connor McDavid

- Avril Lavigne

- Rhianna

- Elliot Page

- Garret Watts

- Ian Somerhalder

- Tyler Joseph

- Phil Lester

- Hayley Williams

- Vic Fuentes

jun 8 2026 ∞
jun 8 2026 +
  • Trixie
  • Towel
  • Ian
  • Sportsys
  • Andie
  • Kai /qp dedicated page to him needed!
  • Trixie /r dedicated page to her needs updating!
  • Mike
jun 9 2026 ∞
jun 9 2026 +
  • A commonly used HTML entity is the non-breaking space: &nbsp;

A non-breaking space is a space that will not break into a new line.

Two words separated by a non-breaking space will stick together (not break into a new line). This is handy when breaking the words might be disruptive.

Examples:

§ 1010 km/h10 PM

  • non-breaking space &nbsp; &#160;
  • < less than &lt; &#60;
  • > greater than &gt; &#62;
  • & ampersand &amp; &#38;
  • " double quotation mark &quot; &#34;
  • ' single quotation mark &apos; &#39;
  • ¢ cent &cent; &#162;
  • £ pound &pound; &#163;
  • ¥ yen &yen; &#165;
  • € euro &euro; &#8364;
jun 9 2026 ∞
jun 9 2026 +
  • love you like a love song - selena gomez
  • california girls - katy perry
  • nobodys home - avril lavigne
  • American Idiot - Green Day
  • King for a day - Green Day
  • Ghost Town - Kanye West
  • This Little Girl - Cady Grooves
  • TikTok - Ke$ha
  • Cannibal - Ke$ha
  • We r who we r - Ke$ha
  • Boom Clap - Charli XCX
  • Vroom Vroom - Charli XCX
  • want u back - Cher Lloyd
  • La La Lainey - Forever the sickest kids
  • You're so creepy - Ghost Town
  • WhatEVER! - Hatsune Miku
  • Witch - Megurine Luka
  • Super Hero - Len Kagamine
jun 8 2026 ∞
jun 8 2026 +
  • Mother Mother
  • Set It Off
  • Lights + Solftcult
jun 8 2026 ∞
jun 8 2026 +
  • Fauna
  • Cute
  • Cozy
  • Soft
  • Gentle
  • Flow
  • Regrets
  • Homage
  • Forget
jun 8 2026 ∞
jun 8 2026 +
  • Better Call Saul
  • Breaking Bad
  • Stranger Things
  • How I met your mother
  • Friends
  • The Sopranos
  • Gilmore Girls
  • Brooklynn 99
  • Community
  • Superstore
  • Heartbreak High
  • Heartstopper
  • Our Flag Means Death
  • Welcome to derry
  • Atypical (Dropped)
  • Emily In Paris
  • Icarly
  • Victorious
  • Unfabulous
  • First Kill
  • Vampire Diaries
jun 8 2026 ∞
jun 8 2026 +