mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 18:32:22 +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;
|
this.y = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
var p = new Point();
|
const p = new Point();
|
||||||
p // { x: 0, y: 0 }
|
p // { x: 0, y: 0 }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user