π§© JavaScript Quiz
In JavaScript, which keyword is used to declare a variable that cannot be reassigned after its initial value is set?
In JavaScript, which keyword is used to declare a variable that cannot be reassigned after its initial value is set?
Anonymous Quiz
15%
let
5%
immutable
69%
const
11%
var
localStorage Persistence: The Silent Bank Vault
Whatβs happening?
localStorage is like a browserβs hard drive. It survives tab/window closures, even system reboots.
Unlike sessionStorage (which dies with the tab), localStorage sticks until explicitly cleared (localStorage.clear() or user clears browsing data).
Gotcha: Itβs synchronous meaning it blocks the main thread if you store large data.
Whatβs happening?
localStorage is like a browserβs hard drive. It survives tab/window closures, even system reboots.
Unlike sessionStorage (which dies with the tab), localStorage sticks until explicitly cleared (localStorage.clear() or user clears browsing data).
Gotcha: Itβs synchronous meaning it blocks the main thread if you store large data.
β€2π1