In browser there is a handy way of checking what kind of object you are dealing with by writing following code:
Object.prototype.toString.call([]); // "[object Array]"
In xPages SSJS
<xp:text escape="true" id="computedField1">
<xp:this.value>
<![CDATA[#{javascript:Object.prototype.toString.call([]);}]]>
</xp:this.value>
</xp:text>
When I'm doing the same thing in xPages SSJS I'm getting following error message:
Error calling method 'call(Array)' on an object of type 'function [JavaScript Object]'
Why am I getting this error in xPages SSJS and is there a way to get around it?