I found a difference between Lotus Domino SSJS iterpretation and regular Javascript.
Look at this snippet…
var mister = "mister in the hat".replace(" ", "-");
return mister
Regular Javascript does replave only once. The result is “mister-in the hat”.
SSJS does full replace. The result is “mister-in-the-hat”.
Is there any documentation, in what way the SSJS is diferent from regular JS?
I suspect Server-Side JavaScript will be influenced more by Java rather than JavaScript. This is because any SSJS written is just passed as a string to a Java method that parses the code at runtime. I know of ither differences to CSJS – parseInt, for example, defaults to base 10, not base 8 (JavaScript default).
The behaviour is documented in the Domino Designer help, under Lotus Domino Designer XPages Reference – Standard (JavaScript) – String – Replace. If in doubt, check out the Help. It’s very good for these libraries, with plenty of examples as well as documentation.