Radified Community Forums
http://radified.com/cgi-bin/yabb2/YaBB.pl
Rad Community Non-Technical Discussion Boards >> The Water Cooler >> Programming | objects vs properties & functions vs methods
http://radified.com/cgi-bin/yabb2/YaBB.pl?num=1318203303

Message started by Rad on Oct 9th, 2011 at 6:35pm

Title: Programming | objects vs properties & functions vs methods
Post by Rad on Oct 9th, 2011 at 6:35pm
my javascript book talks about the global object saying:

the global object defines an initial set of properties that include:

1. global properties (such as undefined, Infinity and Nan)
2. global functions (such as isNan(), parseInt() and eval()
3. constructor functions [such as Date(), RegExp(), String(), Object() and Arrat() ]
4. global objects (such as Math and JSON)

My questions:

re #4 > why arent these called "global propertes" .. since they are "attached" to the global object?

re: #2 & 3 > whya arent these called "methods" .. since they are also "attached" to the global object.

also > why are the items listed in #1 called "properties" while those in #4 called "objects" .. when BOTH are "attached" to the global object.

I use the word "attached" i quotes cuz I'm not sure of the precise terminology I should be using here.

Title: Re: Programming | objects vs properties & functions vs methods
Post by Rad on Oct 9th, 2011 at 6:49pm
to make matters worse, if you look up the global object in the Reference section of the book, they list the constructors with/under the "global functions" (along with Math & JSON) .. not with the "global functions" as one might expect.

(there IS NO separate category for "Constructors".)

I'm trying to form categories in my mind and the terminology used here seems confusing, no?

Radified Community Forums » Powered by YaBB 2.4!
YaBB © 2000-2009. All Rights Reserved.