en.javascript.info/1-js/04-object-basics/06-constructor-new/1-two-functions-one-object/task.md
digital-bw 9e649fb911
Update task.md
Missing '()' invoking a constructor.
2022-09-24 01:25:17 +06:00

19 lines
305 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

importance: 2
---
# Two functions one object
Is it possible to create functions `A` and `B` so that `new A() == new B()`?
```js no-beautify
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.