Environment: VS Code.
I have a tester.js as following:
import without from ‘lodash’;
function Tester ()
// var output = without([1, 2, 3], 1);
console.log(“tester is called!”);
in a html file, I have
< script src=“tester.js”> < /script>
< scrip t>
var tester = new Tester();
The run will shows error:
ReferenceError: Tester is not defined
If I comment out the import line in tester.js, I got correct print out: tester is called!