← Back to archive

Stdle #151 · modern · 2026-11-04

What does this TypeScript snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

enum Size { S, M, L }
const arr = Object.values(Size).filter((v) => typeof v === "number");
console.log(arr.length);
Modern
4 attempts left

Answer & explanation