🧩 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
14%
let
6%
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