Tuesday, June 18, 2024

OIC Javascript Function - Gen3 - the function definition contains unsupported synstax. The output parameter must be named.

While we are creating a javascript function in OIC Gen 3 version, we have received below error:

the function definition contains unsupported synstax. The output parameter must be named.



The javascript code used:

function replaceString(value, str1,str2){

output = value.replace(new RegExp(str1, "g"), str2)

return output;

}

Solution:

If we declare any variable like output here, we have to also add a var keyword before it.

Modified js code:

function replaceString(value, str1,str2){

var output = value.replace(new RegExp(str1, "g"), str2)

return output;

}


No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...