Example:

class test {
  
  constructor() {
    this.Property_1 = null;
    this.Property_2 = null;
    this.Property_3 = null;
  }
}

//create an instance
var a = new test();

//clone an instance
var b = Object.create(a);
Object.assign(b,a);
Advertisements