mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 10:22:23 +00:00
docs: use let/const instead of var
This commit is contained in:
parent
37b125e7fa
commit
5fbafe9efc
@ -47,7 +47,7 @@ function Point(x = 0, y = 0) {
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
var p = new Point();
|
||||
const p = new Point();
|
||||
p // { x: 0, y: 0 }
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user