const abc = null
{
let a = 123
{
let a = 234
}
}
(function() {
})()
{
}
if(true) {
function fn() {console.log('fn提升')}
}
try{
function fn1() {console.log('fn1提升')}
}catch(e) {
}
function f() { console.log('I am outside!'); }
(function () {
if (false) {
function f() { console.log('I am inside!'); }
}
}());
function f() { console.log('I am outside!'); }
(function () {
var f= undefined
if (false) {
function f() { console.log('I am inside!'); }
}
}());
{
let a = 'secret';
function f() {
return a;
}
}
function freezeM(obj) {
Object.freeze(obj)
Object.keys(obj).forEach((key)=> {
if(typeof obj[key] === 'object') {
freezeM(obj[key])
}
})
}
gg =1
function fgg(){}
let g =123
function log(...args) {
return console.log(...args)
}
let [a,b] = [1,2]
let [x,y,z] = new Set([1,2,3])
function *ff() {
let x =0
let y =1
while(true) {
yield y
x = y
y = x+y
}
}
let gen = ff()
for(let i=0;i<10;i++) {
gen.next()
}
const {a:bbb=333} = {a:undefined}
let arrayList = [1,2,3,4,5]
const {0:start,[arrayList.length-1]:end} = arrayList
let xxx
({xxx} = {xxx:1})
Array.prototype.forEach.call('length',(s)=> {
})
var words = ['one', 'two', 'three', 'four'];
words.forEach(function(word) {
if (word === 'two') {
words.shift();
}
});
console