File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ a ( )
2
+ // Function Statement OR Function Declarations
3
+ function a ( ) {
4
+ console . log ( "a called" ) ;
5
+ }
6
+
7
+
8
+ // Function Statement
9
+ function b ( ) {
10
+ console . log ( "b called" ) ;
11
+ }
12
+ b ( )
13
+
14
+
15
+ // Function Expression
16
+ const c = function ( param1 ) {
17
+ return function xyz ( ) {
18
+
19
+ }
20
+ }
21
+ console . log ( c ( ) ) ;
22
+
23
+
24
+ // Anonymous Function is a function without a name
25
+ // function () {
26
+
27
+ // }
28
+
29
+
30
+ // First Class Functions - Ability to used like values
31
+ // First Class CItizens
32
+
33
+ // Named Function Expression
34
+
35
+ // Difference between Parameters & Arguments ?
36
+
37
+ // First Class Functions - Ability to be used like values
38
+ // & First Class Citizens -Ability to be used like values makes this function first class citizens
39
+ // when they are treated as a value passesd into another function or returned from another function,
40
+ // so this is known as a first class function.
41
+
42
+ // Arrow Functions - ES6
43
+ const xyz = ( ) => {
44
+ console . log ( "hello arrow function" ) ;
45
+ }
46
+ xyz ( )
You can’t perform that action at this time.
0 commit comments