I want to call a javascript function like the following from java using nashorn
async function testSample() {
for (var i = 0; i < sample.length; i++) {
await sample[i]();
}
}
So it will execute all the functions in the sample variablel. But I am getting the following error
Expected ; but found function
async function testSample()() {
^ in <eval> at line number 8 at column number 6
Is there support for async functions on nashorn?
Any work around to solve this?
;before async then try