Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : If observable = new can.Observe(foo); then Chrome shows that observable is a Constructor and can be confusing

$
0
0
Notwithstanding, why does it matter what the name of the constructor function is?

To infer that an Object has the traits of something based on the name of the Constructor is like detecting browser features via user agent. It's better to actually test for the traits.

If you really want to know what type of Object something is, there's always instanceof.

Viewing all articles
Browse latest Browse all 3491

Trending Articles