在es6中,我們
export { a, b, c}
export function....
export的方式有很多
但是import的時候也要
import {firstName, lastName, year} from './profile';
用戶有時候不想知道你輸出的到底有啥,那么可以設置一個默認輸出
export default ...
這樣就可以直接引用
import profile from './profile';
但是有時,其實是沒有寫default的,
那么可以
import * as profile from './profile';