function Server(param1) | |
{ | |
this.port=param1; | |
} | |
// static variables | |
Server.getServerIP = function() { | |
return Server.serverIP; | |
}; | |
Server.serverIP = '123.23.23.23'; | |
// instance variables | |
Server.prototype.getClientPort = function() { | |
return this.port; | |
}; | |
Server.prototype.clientIP = ''; | |
Server.prototype.getClientIP = function() { | |
return this.clientIP; | |
}; | |
// instance of Server | |
var yahooDotCom = new Server(); | |
// Begin tests | |
Server.gSIP ; | |
yDC ; | |
yahooDotCom.cIP; | |
yahooDotCom.g ; | |
Server.s ; | |
// Peace | |