![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.javascript archiveRe: "with" statement, extending prototype
From: Julian Turner <julian@baconbutty.com>
Date: Wed Apr 05 2006 - 16:23:26 CEST
eman1000@gmail.com wrote:
[snip]
In rough terms, when the "with" statement finds an "identifier", e.g.
So:-
with (Car) {
works, because "prototype" is an existing property of Car.
So it becomes the equivalent of "Car.prototype.start=", which is a
and
with (Car.prototype) {
does not work, because "start" is not an existing property of
The effect of the above code is to create a new "global" variable
Regards
Julian Turner
|