JS实现链式调用 a().b().c()

function a() {
    this.b = function () {
        console.log('111')
        return this
    }
    this.c = function () {
        console.log('111')
        return this
    }
    return this
}

a().b().c()
今天你学习了吗!!!
原文地址:https://www.cnblogs.com/nayek/p/11851756.html