Depending in what environment you are you need to change some things.
When you have an .js file that exports something like this:
//array.js
export const output = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
Inside your HTML file you need to add the type module
and then you can import it
<script type="module">
import { output } from "./array_test.js"
</script>
Also, you do a named export. That means you need to import it exactly by its name again.
In case you use node.js you would need to go to your package.json
and add a new property to it:
"type": "module"
After this it should work.
Depending on what version your node.js has you would need to add the --experimental-modules
flag when you execute it like: node index.js --experimental-modules