File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,27 +150,27 @@ Objects can be composed of other objects:
150150
1511511 . JavaScript functions are declared using the ``` function ``` keyword.
152152
153- ``` JavaScript
154- var Foo = function () { }
155- ```
153+ ```JavaScript
154+ var Foo = function () { }
155+ ```
156156
1571571 . Functions that do not have a name are * Anonymous Functions* . These are commonly used as callback arguments to other functions.
158158
159- ``` JavaScript
160- // Anonymous function declaration
161- function () { }
162-
163- // Declare a function that takes a callback argument
164- var Foo = function (callback ) {
165- // Foo function body
166- callback ();
167- }
168-
169- // An anonymous function used as a callback argument
170- Foo (function () {
171- // Callback function body
172- });
173- ```
159+ ```JavaScript
160+ //Anonymous function declaration
161+ function () { }
162+
163+ //Declare a function that takes a callback argument
164+ var Foo = function (callback) {
165+ //Foo function body
166+ callback();
167+ }
168+
169+ //An anonymous function used as a callback argument
170+ Foo(function () {
171+ //Callback function body
172+ });
173+ ```
174174
175175## Multi-line statements
176176
You can’t perform that action at this time.
0 commit comments