File tree 1 file changed +29
-2
lines changed
1 file changed +29
-2
lines changed Original file line number Diff line number Diff line change 1
- console . log ( 'hello world' )
2
1
3
2
// Math Methods
4
3
//Floor ()- Rounds down
@@ -21,4 +20,32 @@ console.log(groceries.indexOf('pear'))
21
20
//start from 0 INCLUSIVE and up to 3 [0,3]
22
21
console . log ( groceries . slice ( 0 , 3 ) )
23
22
// console.log(groceries.splice(3, 6))
24
- console . log ( groceries . splice ( 1 , 3 ) )
23
+ console . log ( groceries . splice ( 1 , 3 ) )
24
+
25
+ // Objects
26
+
27
+ const personal = {
28
+ name : 'Lampard' ,
29
+ shirt : "black"
30
+ }
31
+
32
+ console . log ( personal . name )
33
+
34
+
35
+
36
+ const introducerMe = ( name , shirt ) => {
37
+ const person = {
38
+ name : name ,
39
+ shirt : shirt ,
40
+ assets : 5000000 ,
41
+ liabilty : 100000 ,
42
+ netWorth : function ( ) {
43
+ return this . assets - this . liabilty
44
+ }
45
+ }
46
+ const intro = `Hi, my name is ${ person . name } and the color of my shirt is ${ person . shirt } and my net worth is $ ${ person . netWorth ( ) } USD`
47
+
48
+ return intro
49
+ }
50
+
51
+ console . log ( introducerMe ( 'Oyindamola' , 'flowery' ) )
You can’t perform that action at this time.
0 commit comments