Home > Q&A > body text
//file.js export const f = function (a,b) { console.log(a) console.log(b) } //main.js import * as foo from "file.js" foo.f(b=1); Uncaught ReferenceError: b is not defined //报错在 foo.f(b=1)这行.
怪我咯2017-04-10 16:15:17
应该是在函数声明的时候,赋默认值吧?