Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

面试题:如何让 a===1&&a===2? #129

Open
wanghang2017 opened this issue Feb 24, 2021 · 0 comments
Open

面试题:如何让 a===1&&a===2? #129

wanghang2017 opened this issue Feb 24, 2021 · 0 comments
Labels
高频面试 高频面试

Comments

@wanghang2017
Copy link

var i = 1;
Object.defineProperty(global, "a", {
get: () => {
return i++;
}
})
if (a == 1 && a == 2 && a == 3) {
console.log("hahah")
}

@GleanCoder1116 GleanCoder1116 added the 高频面试 高频面试 label Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
高频面试 高频面试
Projects
None yet
Development

No branches or pull requests

2 participants