Skip to content

Files

Latest commit

author
digital-bw
Sep 23, 2022
9e649fb · Sep 23, 2022

History

History
19 lines (12 loc) · 305 Bytes

File metadata and controls

19 lines (12 loc) · 305 Bytes

importance: 2


Two functions – one object

Is it possible to create functions A and B so that new A() == new B()?

function A() { ... }
function B() { ... }

let a = new A();
let b = new B();

alert( a == b ); // true

If it is, then provide an example of their code.