You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: functions/declare.md
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@ function double(x) {
8
8
}
9
9
```
10
10
11
+
>*Note:* the function above **may** be referenced before it has been defined.
12
+
11
13
Functions are also values in JavaScript; they can be stored in variables (just like numbers, strings, etc ...) and given to other functions as arguments :
12
14
13
15
```javascript
@@ -16,6 +18,8 @@ var double = function(x) {
16
18
};
17
19
```
18
20
21
+
>*Note:* the function above **may not** be referenced before it is defined, just like any other variable.
22
+
19
23
---
20
24
21
25
Declare a function named `triple` that takes an argument and returns its triple.
0 commit comments