/*
* @Author: fanjiahui
* @Date: 2018-02-05
* 作用域和闭包
*/
//bar.js
function hello(message) {
return Welcome come to" + message;
}
export hello;
//foo.js
import hello from "bar";
var name = "fanjiahui";
function awesome() {
console.log(
hell0(name).toUpperCase()
);
}
export awesome;
//baz.js
module bar from "bar";
module foo from "foo";
console.log(
bar.hello("jack")
);
foo.awesome();