Skip to content

Commit 32eef26

Browse files
implemented acute and obtuse angle identification in getAngleType function
1 parent 5dc9452 commit 32eef26

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sprint-3/1-implement-and-rewrite-tests/implement/1-get-angle-type.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
// Then, write the next test! :) Go through this process until all the cases are implemented
99

1010
function getAngleType(angle) {
11-
if (angle === 90) {
12-
return "Right angle";
13-
}
11+
if (angle === 90) return "Right angle";
12+
if (angle < 90) return "Acute angle";
13+
if (angle > 90) && (angle < 180)) return "Obtuse angle";
1414
// Run the tests, work out what Case 2 is testing, and implement the required code here.
1515
// Then keep going for the other cases, one at a time.
1616
}

0 commit comments

Comments
 (0)