edit let & function & string

This commit is contained in:
Ruan Yifeng
2015-03-28 07:36:36 +08:00
parent 539a0e9f59
commit 15bcc0e81a
5 changed files with 94 additions and 38 deletions
+5 -5
View File
@@ -45,7 +45,7 @@ function log(x, y = 'World') {
log('Hello') // Hello World
log('Hello', 'China') // Hello China
log('Hello', '') // Hello
log('Hello', '') // Hello
```
@@ -58,7 +58,7 @@ function Point(x = 0, y = 0) {
this.y = y;
}
var p = new Point();
var p = new Point();
// p = { x:0, y:0 }
```
@@ -70,7 +70,7 @@ var p = new Point();
```javascript
fetch(url, { body='', method='GET', headers={} }){
console.log(method);
console.log(method);
}
```
@@ -107,8 +107,8 @@ function f(x, y=5, z) {
```javascript
function foo(x=5, y=6){
console.log(x,y);
function foo(x=5, y=6){
console.log(x,y);
}
foo(undefined, null)