25 Sep 2020
// greeting.js
export function hello() {
return 'hello';
}
export default function hi() {
return 'hi';
}
import { hello } from './greeting.js'
hello();
import hi from './greeting.js
hi();
import hi, { hello } from '.greeting.js'
hi();
hello();
import * as Greeting from './utils'
Greeting.hello(); //=> "hello"
Greeting.default(); //=> "hi"