Sign In Register

How can we help you today?

Start a new topic


I cannot use startsWith in cloud code like described on this page; Is not javascript fully implemented on cloud code?
1 Comment

Hi Ufuk,

startsWith was initially defined in the ECMAScript 6 specification, and our Cloud Code engine, RhinoJS has not upgraded to ECMA6 as of yet.

Alternatives to startsWith include using the substring or lastIndexOf functions, as well as defining a regex for specific string patterns.

For example:

if (myString.substring(0, input.length) === input)


if (myString.lastIndexOf(input, 0) === 0)


Login to post a comment