-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday2.js
More file actions
94 lines (64 loc) · 2.03 KB
/
day2.js
File metadata and controls
94 lines (64 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// let mood = 'sleepy'
// let tirednessLevel = 12;
// if (mood === 'sleepy' && tirednessLevel < 8) {
// console.log('Time to sleep')
// } else {
// console.log('Not time to sleep')
// }
// for (let i = 0; i < 6; i++) {
// console.log(i)
// }
// function myNumber(a , b) {
// return a + b
// }
// const myBuilding = myNumber(7 , 8)
// console.log(myBuilding)
// let musician = ['davido', 'wizkid', 'olamide' , 'youngjohn'];
// for (let i = 0; i < musician.length; i++) {
// console.log('i will love to sing with' + ' ' + musician[i])
// }
// let family = ['father', 'mother', ['manone', 'mantwo', 'manthree', ['james', 'abel', 'caleb']],
// ['girlone', 'girltwo', 'girlthree', ['sarah', 'grace', 'favour']]];
// console.log(family[2][3][0])
// console.log(family[3][3][1])
// let arr = [1,2,3,4,5,6,7,89,12,32,45,65,43,12]
// function myNumber(number) {
// let newNum = number.filter(number => number > 10)
// return newNum
// }
// console.log(myNumber(arr))
// let friut = ['banana','apple','mango','pineapple'];
// console.log(friut[0])
// friut[1] = 'carrot'
// console.log(friut)
// friut.push('star friut','cucumber')
// console.log(friut)
// friut.pop('mango','carrot');
// console.log(friut);
// let mood = 'sleepy';
// let tirednessLevel = 20;
// if (mood === 'sleepy' && tirednessLevel < 10) {
// console.log('Time to sleep')
// } else {
// console.log('Not time to sleep')
// }
// let season = 'summer';
// if (season === 'winter') {
// console.log('it is raining')
// } else if (season === 'summer') {
// console.log('it is sunny')
// } else if (season === 'spring') {
// console.log('Tree are falling')
// } else {
// console.log('not raining')
// }
let musician = '';
if (musician === 'jurld world') {
console.log('he is just a singer not a rapper')
} else if (musician === 'polo g') {
console.log('he is also a singer not a rapper')
} else if (musician === 'adele') {
console.log('she is a wonderful singer')
} else {
console.log('all are just rapper and not a singer')
}