We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
例如:
(5).add(3).minus(2) 5 + 3 - 2 = 6 3 - 1 + 2 = 4
The text was updated successfully, but these errors were encountered:
Object.defineProperties(Number.prototype, { add: { // 加 value: function (num) { return this + num; } }, sub: { // 减 value: function (num) { return this - num; } } }); (5).add(3).sub(2); // 6
如上,我只能想到直接扩展原生对象的方式。
Sorry, something went wrong.
No branches or pull requests
例如:
The text was updated successfully, but these errors were encountered: