Frage im Vorstellungsgespräch bei Walmart

Clone a object in javascript.

Antwort im Vorstellungsgespräch

Anonym

14. Dez. 2015

* JSON.parse(JSON.stringyfy(object)) * or iterate over the obj and verify hasOwnProperty and assign it to a new object. The interviewer was not satisfied with either of the answer and provided something which I could not comprehend.