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

怎么修改变量本身和引用呢? #45

Closed
snowman opened this issue Jul 22, 2021 · 3 comments
Closed

怎么修改变量本身和引用呢? #45

snowman opened this issue Jul 22, 2021 · 3 comments

Comments

@snowman
Copy link

snowman commented Jul 22, 2021

改变变量名 n -> number:

// before
function square(n) {
  return n * n;
}

var n = {};
n.n = square(10);
// after
function square(number) {
  return number * number;
}

var n = {};
n.n = square(10); 
@snowman
Copy link
Author

snowman commented Jul 22, 2021

非常感谢!

@snowman snowman closed this as completed Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants