By darthvader
via milkshakesystems.com
Published: Jan 05 2010 / 10:32
We mentioned that Functions in JS are considered objects, this means that like any other object a function can be assigned to variables, have properties, passed as a parameter to other function and returned as a function result.
Tweet
SaveShareSend
Tags: javascript



Comments
yakkoh replied ago:
Reason #25 to have a true OO language for scripting HTML.
Dave Newton replied ago:
For specific values of "true", not necessarily relating to OO-ness. Prototype-based OO is still OO. (Unless I misinterpreted your comment, and that's what you meant.)
yakkoh replied ago:
By 'true', I mean real, genuine, effective, like C++, Java or Ruby, with class, and construct and so on.
Actually I think (and wish) that javascript should be replaced by actionscript or ruby ... or PHP/client.
psayre23 replied ago:
true & true + true && true != true
Each of these parts, buy themselves will == true. But the results (due to order of operations) will cause a false (rather, 0)
,
kangax replied ago:
`this` is not an operator, it's a keyword.
Voters For This Link (15)
Voters Against This Link (3)