I have 2 files script.js and newFunction.js.
------ script.js -------
import {pi} from `./newFunction`
console.log(pi);
------ newFunction.js --------
export const pi = 3.141592653;
in the second I am creating variable pi and in first exporting it, but the problem is when I run this gives me an error
SyntaxError: Cannot use import statement outside a module
So how can I fix it?