Skip to content

Commit 897b8fc

Browse files
committed
Change function order in functions (7.1) example
Part 7.1 says first why function declarations are not good and after that it recommends to give a name to function expression. The same order could be used in example too.
1 parent d0fb763 commit 897b8fc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -580,14 +580,14 @@ Other Style Guides
580580
581581
```javascript
582582
// bad
583-
const foo = function () {
583+
function foo() {
584584
// ...
585-
};
585+
}
586586

587587
// bad
588-
function foo() {
588+
const foo = function () {
589589
// ...
590-
}
590+
};
591591

592592
// good
593593
const foo = function bar() {

0 commit comments

Comments
 (0)