console.log("geyao")
var sched={
    wakeup:function(){
        console.log('Running')
        return this
    },
    morning:function(){
        console.log('Going shopping')
        return this
    },
    noon:function(){
        console.log('Having a rest')
        return this
    },
    afternoon:function(){
        console.log('studying')
        return this
    },
    evening:function(){
        console.log('Walking')
        return this
    },
    night:function(){
        console.log('Sleeping')
        return this
    },
}

sched.wakeup().morning().noon().afternoon().evening().night()

运行结果

 

前端学习笔记202310学习笔记第一百零玖天-vue3-链式调用&对象属性与遍历&this指向&caller_callee之4_笔记

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6
标签: vue