0
I have a javascript function to read files that are inside the server. In all browsers it Funiona perfectly, with the exception of firefox that returns the error:
Syntaxerror: Missing ; before statement
Function code:
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function lerArquivo(arquivo) {
var response;
jQuery.get(arquivo, function(data) {
response = data;
}, 'text');
await sleep(500);
return response;
}
What would be the line of error?
– Sam
In firefox accuses the first line after the end of the Sleep function, ie the line on which I declare the file function.
– Gabriel Sarates