i'm trying to import a function from 'test.js' in 'index.js'
test.js:
var testFunction = function test(){ alert("hello World") }
export testFunction
in the very top of 'index.js' i tried the following statement:
import testFunction from './test.js'
now i've got the following error in my firefox console, when i'm running my index.html file in the browser:
SyntaxError: import declarations may only appear at top level of a module (in line 1)