返回资讯中心
外部精选
软件工程
#开发者实时流

Show HN: Can you still read code? 155 JavaScript questions as a game

155 JavaScript questions that look easy and aren't. Use your brain, choose an answer, learn why.

Hacker News 最新silisav2026/10/25 · 11 天前2 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

155 JavaScript questions that look easy and aren't. Use your brain, choose an answer, learn why.

function sayHi() { console.log(name); console.log(age); var name = 'Lydia'; let age = 21; }

sayHi();

ALydia and undefinedBLydia and ReferenceErrorCReferenceError and 21Dundefined and ReferenceError

Pick one. It counts as your answer in the game.

Know what the code does.

Agents write most of the code now, faster than anyone can review it. So we write less, read less, and slowly forget things we used to know.

Put the agent aside for a few minutes. Each question is a few lines of JavaScript with one right answer and a short explanation: a small workout for your memory and your mental model of the language.

The questions and explanations come from Lydia Hallie's javascript-questions (opens in a new tab), used under the MIT licence.

Feel free to add a question (opens in a new tab). The app is open source.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →