3 ms·
JavaScript is a dramatically OO language. It's just not the OO you're used to. Everything* in JS other than numbers, strings, and booleans are objects. Functio
by jdlshore 13y ago
JavaScript is a dramatically OO language. It's just not the OO you're used to.
Everything* in JS other than numbers, strings, and booleans are objects. Functions are objects.
See http://www.objectplayground.com http://www.objectplayground.com for details. (Temporarily down due to server problems, but hopefully back up soon.)
*Not really everything. Not objects: undefined, null, number, string, boolean. Objects: object, array, regexp, function, everything else.
- AnimalMuppet 13y agoWhat definition of OO doesn't include encapsulation? And encapsulation in JS is fundamentally broken - everything is public.