如何实现 a==1&&a==2&&a==3 ?

let x= 0
Object.defineProperty(window,'a',{
    get(){
        return ++x    
    } 
})
if(a==1&&a==2&&a==3)console.log('zjy')

  

猜你喜欢

转载自www.cnblogs.com/zhenjianyu/p/12976860.html
今日推荐