const praiseBeToCthulhu = (len) => { const obj = { a: '"' } obj.b = '' const codepoints = JSON.stringify(obj).split('') .map(ch => ch.codePointAt()) const grab = (n) => codepoints.slice(n).shift() const x = grab(6) const y = grab(9) let s = String.fromCharCode(x - 1) for (let i = 0; i < len; ++i) { s += Object.getPrototypeOf( Object.getPrototypeOf( Object.getPrototypeOf( Object ) ) ) s += String.fromCharCode(y) } if (s.length > 1) { const z = s.split('') z.pop() s = z.join('') } s += String.fromCharCode(x + 1) return JSON.parse(s) }
OK, there are definitely more concise ways, but hey, maybe you're getting paid by the number of lines of code you write.
Thank-you for coming to my TED talk. 🙇♀️
Top comments (0)