File tree 3 files changed +52
-0
lines changed 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+
3
+ function printUserDetails ( firstName , lastName , mobile ) {
4
+ console . log ( `\n\n` ) ;
5
+ console . log ( `firstName: ${ firstName } ` )
6
+ console . log ( `lastName: ${ lastName } ` )
7
+ console . log ( `mobile: ${ mobile } ` )
8
+ console . log ( `length: ${ arguments . length } ` ) ;
9
+ console . log ( `arguments ${ JSON . stringify ( arguments ) } ` )
10
+ }
11
+
12
+ printUserDetails ( ) ;
13
+ printUserDetails ( 'ashfaq' ) ;
14
+
15
+ function printUserDetailsWithDefault ( { firstName= "Mohammed" , lastName= "ansari" , mobile= 94899978789789 } = { } ) {
16
+ console . log ( `\n\n` ) ;
17
+ console . log ( `firstName: ${ firstName } ` )
18
+ console . log ( `lastName: ${ lastName } ` )
19
+ console . log ( `mobile: ${ mobile } ` )
20
+ }
21
+
22
+ printUserDetailsWithDefault ( ) ;
23
+ printUserDetailsWithDefault ( { firstName :'ashfaq' } ) ;
24
+ printUserDetailsWithDefault ( { lastName :'ANSARI' } ) ;
25
+ printUserDetailsWithDefault ( { mobile :91281982091 } ) ;
26
+
Original file line number Diff line number Diff line change
1
+ let collection = [
2
+ 1 ,
3
+ false ,
4
+ {
5
+ name : "Ashfaq" ,
6
+ address : "kalajyothi kondapur" ,
7
+ } ,
8
+ function ( { name, address} = { } ) {
9
+ console . log ( `name: ${ name } ` ) ;
10
+ console . log ( `address: ${ address } ` ) ;
11
+ }
12
+ ]
13
+
14
+
15
+ collection [ 3 ] ( collection [ 2 ] ) ;
Original file line number Diff line number Diff line change
1
+ < html >
2
+ < head >
3
+
4
+ </ head >
5
+ < body >
6
+ < meta charset ="utf-8 "/>
7
+
8
+ <!-- <script src="collection.js"></script> -->
9
+ < script src ="arguments.js "> </ script >
10
+ </ body >
11
+ </ html >
You can’t perform that action at this time.
0 commit comments