You'd have to know that strings are arrays of chars (or in javascript, strings are arrays of single length strings with some special exceptions), then you'd have to know spreading an array into an object creates a key and a val with each letter, then you'd have to know Object.keys makes an array from an object's keys, and you'd have to know how a reducer works to get a sum of length
View all comments
Show parent comment
25
u/breadcodes Mar 10 '23 edited Mar 10 '23
Tis a joke.
You'd have to know that strings are arrays of chars (or in javascript, strings are arrays of single length strings with some special exceptions), then you'd have to know spreading an array into an object creates a key and a val with each letter, then you'd have to know
Object.keysmakes an array from an object's keys, and you'd have to know how a reducer works to get a sum of lengthIt's very clearly a joke.