Virtual Onsite Rejection from Meta Frontend Role

  1. Coding
  1. Implement DOMStore
    DOMStore
    has(node) // node: DOMNode
    get(node) // node: DOMNode
    set(node, value), // node: DOMNode, value: any
    const store = new DOMStore();
    const a = document.createElement(‘div’);
    const b = document.querySelector(‘.b’);
    store.set(a, 3);
    store.set(b, ‘x’);
    store.has(a); // true
    store.has(b); // true
    store.get(a); // 3
    store.get(b); // ‘x’

  2. Implement test Framework
    // Test framework
    it() // it(name, test function)
    expect() // expect(value) → { toBe(value) { … } }
    toBe()

// example test
it(‘should be an equal number’, () => { //
expect(1).toBe(1);
});
// This logs to the console:
// “Success: should be an equal number”
it(‘should be an equal number’, () => {
expect(2).toBe(2);
expect(2).toBe(2);
expect(1).toBe(2);
});
// This logs to the console:
// “Failure: should be an equal number”

  1. coding
  1. Implement memorize, various follow-ups leading to frustration
  2. Implement debounce
  3. Implement throttle, follow-ups, variations, requiring a delay even for the first execution
  1. System design, a feed with automatically updating comment lists

Struggling a bit in system design, need to improve.

1 Like