<script language=Javascript> 
javascript
function object_display(msg) {
object method
return msg + ' (' + this.variable++ + ')'; } function object() {
object constructor
this.variable=0; this.display = object_display; return this; } var a = new object();
create object
document.write(a.display("a message")); document.write(a.display("another message")); </script>