Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Commit d102ec3

Browse files
committed
feat: Challenge 3 and 4 of JS Fundamentals Done
1 parent 1eb6d41 commit d102ec3

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
let scoreDolphins = 96 + 108 + 89;
2+
let scoreKoalas = 88 + 91 + 110;
3+
4+
if (scoreDolphins > scoreKoalas)
5+
{
6+
console.log("Dolphins win the trophy");
7+
}
8+
else if (scoreDolphins < scoreKoalas)
9+
{
10+
console.log("Koalas win the trophy");
11+
}
12+
else
13+
{
14+
"Both win the trophy";
15+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const bill = 275;
2+
var tip = (bill >= 50 && bill < 300) ? bill * 0.15 : bill * 0.2;
3+
console.log(`The bill was ${bill}, the tip was ${tip}, and the total value ${tip + bill}`);

0 commit comments

Comments
 (0)