You are here: irt.org | FAQ | JavaScript | Object | Q794 [ previous next ]
Pass the name of the instance as a parameter:
<SCRIPT LANGUAGE="JavaScript"><!-- functionmyObject (number,string,name) { this.number = number; this.string = string; this.name = name; } X = new myObject(1,'x',"X"); //--></SCRIPT>