Skip to content

Commit a369677

Browse files
committed
Merge pull request airbnb#88 from DeanXu/patch-1
better?
2 parents c4ebea9 + 5c30b95 commit a369677

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -521,18 +521,17 @@
521521
var named = function superPower() {
522522
console.log('Flying');
523523
};
524+
}
525+
526+
// the same is true when the function name
527+
// is the same as the variable name.
528+
function example() {
529+
console.log(named); // => undefined
524530

531+
named(); // => TypeError named is not a function
525532

526-
// the same is true when the function name
527-
// is the same as the variable name.
528-
function example() {
529-
console.log(named); // => undefined
530-
531-
named(); // => TypeError named is not a function
532-
533-
var named = function named() {
534-
console.log('named');
535-
};
533+
var named = function named() {
534+
console.log('named');
536535
}
537536
}
538537
```

0 commit comments

Comments
 (0)