how to get an array from another script in js

Solutions on MaxInterview for how to get an array from another script in js by the best coders in the world

showing results for - "how to get an array from another script in js"
Anissa
15 Feb 2017
1// SCRIPT WHERE THE ARRAY IS
2var yourArray;
3export{yourArray/*, OtherThingsYouWannaExport*/}
4
5// SCRIPT WHERE WE NEED THE ARRAY
6import * as chooseName from './TheNameOfYourScriptFile.js'
7chooseName.yourArray; // You can now access the array