// shallow copy :: modification in original array var newEmployee = employee; // Deep copy :: no modification in orifinal array var newEmployee = JSON.parse(JSON.stringify(employee));