Programming language of the web. Play JavaScript trivia solo to sharpen your knowledge, or challenge a friend head-to-head in Trivia Tango — every question comes with an explanation so you learn as you play. Questions span every level, from easy warm-ups to expert-level stumpers, so there's a real challenge here however much you already know.
A mix of easy, medium and hard — questions run from warm-up to expert, so there's a real challenge at every level. Think you know the answers? Play to find out.
In a web browser, this built-in function displays a popup dialog box with a message and an OK button.
Difficulty: EasyThis object represents the eventual completion or failure of an asynchronous operation and its resulting value.
Difficulty: MediumThis technique prevents creating multiple instances of an object by caching and returning the existing instance.
Difficulty: HardThis keyword declares a variable that cannot be reassigned after its initial value is set.
Difficulty: EasyThis keyword pauses async function execution until a Promise is settled and returns its result.
Difficulty: MediumThis V8 optimization technique compiles frequently executed bytecode directly to machine code for faster execution.
Difficulty: HardThis operator checks both value and type equality, returning true only when both match exactly.
Difficulty: EasyThis method creates a shallow copy of a portion of a string as a new string.
Difficulty: Medium