📌  相关文章
📜  如何从 js 中的另一个脚本中获取数组 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:22.509000             🧑  作者: Mango

代码示例1
// 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