We can copy objects in several ways, using the for in loop or the object.assign function.