What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-08 02:04:03
how to get an array from another script in js
// SCRIPT WHERE THE ARRAY IS var yourArray; export{yourArray/*, OtherThingsYouWannaExport*/} // SCRIPT WHERE WE NEED THE ARRAY import * as chooseName from './TheNameOfYourScriptFile.js' chooseName.yourArray; // You can now access the array Add solution