Wanderlust: Step 13. Safari browser console error. "Unexpected identifier 'fetch'. Expected ':' after variable declaration."

I keep getting the same error in my safari browser console “unexpected identifier ‘fetch’. Expected ‘:’ after variable declaration.”
I can’t seem to figure out the issue to resolve the problem.
Any help appreciated.

![Screen Shot 2020-06-02 at 3.32.54 PM|578x500](upload://3wQ8f5kpPRj75bjAnrIvIxoAFSV.png) 

I’m getting the same error and I’m also not getting a response printed to the console. Did you manage to find out the solution?

I know am half a year too late, but I had the same issue just now. I am writing this in case anyone in future wonders what is the issue.

I had the below code, which I was running in Safari.

<script async>
    const result = await fetch('/api')

It produces the syntax errors in the browsers:
Safari: [Error] SyntaxError: Unexpected identifier ‘fetch’. Expected ‘;’ after variable declaration.
Chrome: Uncaught SyntaxError: await is only valid in async functions and the top level bodies of modules

However, when I run fetch('/api') in the Console, then it worked.

I decided to just wrap the await fetch(); in an async function call, which worked and solved the issue:

<script async>
    (async () => {
        const result = await fetch('/api')