Aventude interview question

How to create a shallow and deep copy of a object in javascript