Skip to content
breakpoınt

ReturnTrue

Find the shortest input that makes each JavaScript function return true

ReturnTrue is a set of short JavaScript puzzles. Each level shows you a function, and you must type an input that makes it return true. The catch is that your input should be as short as possible. Your length is counted as strokes, and a leaderboard ranks players by levels solved and total strokes.

Play on alf.nu

Free · No login · Browser · Advanced

About ReturnTrue

The puzzles rely on the strange corners of JavaScript, such as type coercion, NaN and other edge cases. It suits experienced JavaScript developers who enjoy code golf.

It runs in the browser with no sign-up. To keep your progress or move to another browser, you bookmark a personal link. Players can also create their own levels.

On Breakpoint since 23 Oct 2026.

Is this your game? Update the listing

Keyboard shortcuts

j / k
Move down / up the list (this page)
] / [
Next / previous page
o
Open the focused game
b
Save or unsave the focused game
/
Search (the home list, or the command palette elsewhere)
Ctrl K
Command palette: games, skills, pages (works even when single keys are off)
?
This help