<script>
var name = 'world!';
(function() {
var name;
if (typeof name === 'undefined') {
name = 'J'
console.log('Good' + name);
} else {
console.log('hellow' + name);
}
})();
</script>
今天去面试记得这道面试题 大家猜猜打印出来结果是啥
答案:GoodJ