Skip to content

Commit def5669

Browse files
fixed if statement for obtuse angle
1 parent 0709cbe commit def5669

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
function getAngleType(angle) {
1111
if (angle === 90) return "Right angle";
1212
if (angle < 90) return "Acute angle";
13-
if (angle > 90) && (angle < 180)) return "Obtuse angle";
13+
if ((angle > 90) && (angle < 180)) return "Obtuse angle";
1414
if (angle === 180) return "Straight angle";
1515
// Run the tests, work out what Case 2 is testing, and implement the required code here.
1616
// Then keep going for the other cases, one at a time.
@@ -51,6 +51,7 @@ assertEquals(acute, "Acute angle");
5151
// When the angle is greater than 90 degrees and less than 180 degrees,
5252
// Then the function should return "Obtuse angle"
5353
const obtuse = getAngleType(120);
54+
assertEquals(obtuse, "Obtuse angle");
5455
// ====> write your test here, and then add a line to pass the test in the function above
5556

5657
// Case 4: Identify Straight Angles:

0 commit comments

Comments
 (0)