i'm reading the new rhino book (flanagan 6th).
in it, where he introduces METHODS, he says "When we combine FUNCTIONS with OBJECTS we get METHODS". Then he creates an empty ARRAY:
then he uses the "push() method" to add elements to the array.Code:var a = ;
uh, methods are for *objects* right? Yet he is using them on an ARRAY.Code:a.push(1,2,3);
Can somebody help me see the light on how an array can magically becomes an object that is manipulated by a "method"?
I mean, the array is still an array, no? It never actually becomes an object, right? Yet we still use a *method* to manipulate it. See my conceptual quandry?