Skip to content

Commit c7c9538

Browse files
committed
Work on sprint 3 1-get-angle-type
put in code using "if" function.
1 parent b31a586 commit c7c9538

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@
1616

1717
function getAngleType(angle) {
1818
// TODO: Implement this function
19+
if (angle < 90) {
20+
return "Acute angle"
21+
} else if (angle ===90) {
22+
return "Right angle"
23+
} else if (angle < 180) {
24+
return "Obtuse angle"
25+
} else if (angle ===180) {
26+
return "Straight angle"
27+
} else if (angle < 360) {
28+
return "Invalid angle"
29+
}
1930
}
2031

2132
// The line below allows us to load the getAngleType function into tests in other files.

0 commit comments

Comments
 (0)