class Camera {
constructor(id){
this.id = id;
}
constructor(id, name){
this.id = id;
this.name = name;
}
}
let camera = new Camera('A456','Karan');
let drone = new Camera('A1');
console.log(`camera: ${camera['id']} ${camera['name']}`)
console.log(`drone: ${drone['id']}`)
**IS the ABOVE code said as the constructor overloading?**
I am getting this code as success output but when i change the sequence of constructors , i am getting an error