Frage im Vorstellungsgespräch bei 1stDibs.com

Recursively flatten a nested hash in JavaScript. Explain the difference between classical and prototypal inheritance. Code runtime optimization