不知道这段为什么有bug

const Person2 = {
    
    
    'name': 'little bear',
    'sayHello': () => {
    
    
        SetTimeout(() => {
    
    
            console.log('我叫’+this.name+'我今年'+this.age+'岁')
        }, 1000);
    }
};
Person2.sayHello();

猜你喜欢

转载自blog.csdn.net/weixin_40945354/article/details/115296535