en.javascript.info/1-js/6-objects-more/3-constructor-new/1-two-functions-one-object/task.md
2015-01-14 10:23:45 +03:00

17 lines
No EOL
450 B
Markdown
Raw 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]
Возможны ли такие функции `A` и `B` в примере ниже, что соответствующие объекты `a,b` равны (см. код ниже)?
```js
function A() { ... }
function B() { ... }
var a = new A;
var b = new B;
alert( a == b ); // true
```
Если да -- приведите пример кода с такими функциями.