2015102201

var executerQueue = []
executerQueue.exec = function() {
    if (executerQueue.length) {
        executerQueue.shift().exec()
    }
}

function F1() {
    this.exec = function() {
        console.log('F1')
    }
}

function F2() {
    this.exec = function() {
        console.log('F2')
    }
}
executerQueue.push(new F1())
executerQueue.push(new F2())
executerQueue.exec()
executerQueue.exec()
var gestures = {
    a: 'a',
    b: 'b'
}
Object.keys(gestures).length

 

var tid
window.addEventListener('resize', function() {
    clearTimeout(tid)
    tid = setTimeout(function() {
        console.log(1)
    }, 300)
}, false);
原文地址:https://www.cnblogs.com/jzm17173/p/4900177.html