Hi JC,
Sure, you can call
Of course, this will break if
In general we don't recommend explicit usage of JavaScript's String, Number, or Boolean objects, as their behavior can be unexpected:
Good luck!
Is there an easy way to read the string object as a string without using the .toString() function in JS itself?
Sure, you can call
toString()
or valueOf()
from the host:s = engine.getChunkJSON(num).valueOf()
getChunkJSON()
changes and starts returning normal strings.In general we don't recommend explicit usage of JavaScript's String, Number, or Boolean objects, as their behavior can be unexpected:
if (new String('foo') == new String('foo')) { // code here WILL NOT be executed } if (new Boolean(false)) { // code here WILL be executed }