-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
95 lines (78 loc) · 2.72 KB
/
Copy pathapp.js
File metadata and controls
95 lines (78 loc) · 2.72 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
93
94
95
var head = document.getElementById("heading");
var text = document.createTextNode("TEAM HERMES");
head.appendChild(text);
document.getElementById("container").style.backgroundColor ="white";
document.getElementById("heading").style.color = "blue";
document.getElementById("lists").style.color = "red";
const teamMates = ["Code Giyu", "Natacha", "Adedamola", "Fawsiyyah", "Dee Vee", "Ifechukwude", "Michael"];
console.log(teamMates[3]);
const about = {
"First name": "Fawsiyyah",
"Last name": "Lamidi",
"Best movie": "My best moovie is Blood and Water",
"Best food": "Noodles",
"Complexion": "Fair",
"State": "Osun",
"Group name": "Team Hermes"
};
console.log(about["Best movie"]);
var noun = " Tolu ";
var verb = " sings ";
var adjective = " beautiful";
const firstSentence = noun + "is" + adjective + ".";
const secondSentence = noun + verb + "beautifully.";
const thirdSentence = "Adam" + verb + "with" + adjective + noun +".";
const fourthSentence = "Ada" + " and" + noun + "are" + adjective + ".";
const fifthSentence = noun + verb + "like an angel.";
console.log(firstSentence);
console.log(secondSentence);
console.log(thirdSentence);
console.log(fourthSentence);
console.log(fifthSentence);
function remainder(a,b) {
return a%b;
}
console.log(remainder(35,6));
function almightyQuadraticFormula(a,b,c){
var discriminant = Math.pow(b,2)- 4 * a*c;
let rootOne = (-1* b + Math.sqrt(discriminant)) / 2 * a ;
let rootTwo = (-1* b - Math.sqrt(discriminant)) / 2 * a ;
let answer = "The roots of your quadratic equation are " + rootOne + " and " + rootTwo + ".";
return answer;
}
console.log(almightyQuadraticFormula(2,-3,1));
const myNoun = " dog ";
const myAdjective = " big ";
const myVerb = " ran ";
const myAdverb = " quickly ";
const wordBlanks = "The" + myAdjective + myNoun + myVerb + myAdverb + "across the road.";
console.log(wordBlanks);
const pi = 3.142;
function area(pi, r) {
return pi * r * r;
}
console.log(area(pi,9));
var p = 8200;
var r = 17.5;
var t = 2.5;
console.log(p*r*t/100);
var meritHeight = 1.69;
var meritWeight = 78;
var nutjobHeight = 1.95;
var nutjobWeight = 92;
let meritBmi = meritWeight /(meritHeight * meritHeight);
let nutjobBmi = nutjobWeight /(nutjobHeight * nutjobHeight);
console.log(meritBmi);
console.log(nutjobBmi);
var meritHeighttwo = 1.76;
var meritWeighttwo = 85;
var nutjobHeighttwo = 1.88;
var nutjobWeighttwo = 95;
let meritBmitwo = meritWeighttwo /(meritHeighttwo * meritHeighttwo);
let nutjobBmitwo = nutjobWeighttwo /(nutjobHeighttwo * nutjobHeighttwo);
console.log(meritBmitwo);
console.log(nutjobBmitwo);
let meritHeigherBmi = meritBmi > nutjobBmi;
console.log(meritHeigherBmi);
let nutjobLowerBmi = nutjobBmitwo < meritBmitwo;
console.log(nutjobLowerBmi);