Language concepts
Memoization
Caches deterministic results according to a chosen key. Handle falsy values, stale mutable keys and cache growth.
Formal Syntax & Structure
javascript syntaxjavascript
cache.has(key) ? cache.get(key) : computeAndStore(key)Working Example
Example Snippetjavascript
const m=new Map([[0,0]]);console.log(m.has(0),m.get(0));