← Back to archive

Stdle #59 · namespaces · 2026-08-04

What does this TypeScript snippet output?

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

namespace P {
const hidden = 1
export const shown = 2
}
console.log(Object.keys(P).length)
Namespaces
4 attempts left

Answer & explanation