如何导出多个数组

Ale*_*x K 1 export reactjs

如果我有两个数组,如何导出它们,例如:

const a=['a','b','c']
const b=['1','2','3']

export default a,b?
Run Code Online (Sandbox Code Playgroud)

v21*_*103 5

导出时尝试以下操作:

const arr1 = ['a','b','c']
const arr2 = ['1','2','3']
export default { a, b }

Run Code Online (Sandbox Code Playgroud)

并且在导入时

import { arr1, arr2 } from "path to the file";

//your code
Run Code Online (Sandbox Code Playgroud)