Skip to content

Commit 71c13b0

Browse files
initial commit
1 parent f37b0c2 commit 71c13b0

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

40_vehiclePurchaseInstructions.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const needsLicense = (kind) => {
2+
// code here
3+
4+
return ["car", "truck"].includes(kind);
5+
};
6+
7+
const chooseVehicle = (option1, option2) => {
8+
// code here
9+
10+
return `${
11+
option1.localeCompare(option2) === 1 ? option2 : option1
12+
} is clearly the better choice.`;
13+
};
14+
15+
const calculateResellPrice = (originalPrice, age) => {
16+
// code here
17+
18+
let factor = 0;
19+
20+
if (age > 10) factor = 0.5;
21+
else if (age < 3) factor = 0.8;
22+
else factor = 0.7;
23+
24+
return originalPrice * factor;
25+
};

abc.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)