Closures, the event loop, prototypes, promises and the quirks that trip people up in front-end loops.
Write entryPoint(items, size) that splits items into consecutive
chunks of length size. The last chunk may be shorter if items
doesn't divide evenly. If size is less than 1, return an empty array.
Return the chunks as an array of arrays, in the original order.
Write entryPoint(records, key) that groups an array of plain objects
by the value at records[i][key]. Return a plain object whose keys are
the group values converted to strings, and whose values are arrays of
the original records, in their original relative order. Records whose
What does Array.prototype.map do differently from .forEach? And what
does .filter do? Walk me through what each one returns.
Name a few array methods that mutate the array in place versus ones
that return a new array without touching the original. Then tell me
what's wrong with [10, 1, 2].sort() and how you'd fix it.
Compare for...of, for...in, and .forEach() for iterating an
array. Why can't you break out of a .forEach() call with a break
statement, and what would you use instead?
Write entryPoint(a, b) that divides a by b, safely.
Internally: throw an Error with message "invalid input" if a or
b is not a finite number (use Number.isFinite). Otherwise, throw an