Facebook | Phone | Front End Engineer
Anonymous User
3901
  1. Write a class called DOMStore that stores a Node and a value (reimplement Map). DOMStore contains the following functions:
has(node) // returns boolean
get(node) // returns node or undefined
set(node, value) // "upsert", update or insert
  1. Flatten an array with unknown depth (reimplement .flat(Infinity)).
    a. Write it both recursively and iteratively.
Comments (6)