用export 可以指派函式、物件或變數,透過import 宣告給外部檔案引用。 ... module "my-module.js" export default function cube(x) { return x * x * x; }
確定! 回上一頁