APETYPE/practice
javascript·passage intermediate
Desktop Required to Type
Desktop Recommended for Code Typing
ApeType code transcription is engineered for physical mechanical and laptop keyboards with syntax navigation. Mobile on-screen keyboards cannot provide authentic typing cadence.
You can see the leaderboard hereTop Typists
view all1/ 17
1
const memoize = (fn) => {↵
2
const cache = new Map();↵
3
return (...args) => {↵
4
const key = JSON.stringify(args);↵
5
if (cache.has(key)) {↵
6
return cache.get(key);↵
7
}↵
8
const computed = fn(...args);↵
9
cache.set(key, computed);↵
10
return computed;↵
11
};↵
12
};↵
13
↵
14
const fibonacci = memoize((n) => {↵
15
if (n <= 1) return n;↵
16
return fibonacci(n - 1) + fibonacci(n - 2);↵
17
});
tab+enter- restart
esc- restart