mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2024-04-21 12:32:22 +00:00
docs: use let/const instead of var
This commit is contained in:
+1
-1
@@ -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 }
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user