Question d’entretien chez 1stDibs.com

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