Hi,
This is from the book 'Javascript the good parts'.
I have replaced the document.writeln() with print() so that I can run it in eclipse with rhino.
When I try to run it, I get:
js: line 24: missing name after . operator
js: myObject.double = function () {
js: ...............^
js: line 32: syntax error
js: };
js: ^
js: line 34: missing name after . operator
js: myObject.double();
js: ...............^