![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.javascript archiveVariables and Object creation using prototypes
From: <nrlz@hotmail.com>
Date: Sun Apr 30 2006 - 13:33:43 CEST
Try to guess what happens if I run the following code in any modern
1) 1,2...a,b
Here is the code:
function Group() {
Group.prototype = {
addMember: function(m) {
listMembers: function() {
var my1 = new Group();
var my2 = new Group();
alert(my1.listMembers() + "..." + my2.listMembers());
Cheers!
|