@@ -22,6 +22,9 @@ function getAngleType(angle) {
2222 if ( angle === 180 ) {
2323 return "Straight angle" ;
2424 }
25+ if ( angle > 180 && angle < 360 ) {
26+ return "Reflex angle" ;
27+ }
2528}
2629
2730// The line below allows us to load the getAngleType function into tests in other files.
@@ -60,16 +63,15 @@ assertEquals(acute, "Acute angle");
6063// Then the function should return "Obtuse angle"
6164const obtuse = getAngleType ( 120 ) ;
6265assertEquals ( obtuse , "Obtuse angle" ) ;
63- // ====> write your test here, and then add a line to pass the test in the function above
6466
6567// Case 4: Identify Straight Angles:
6668// When the angle is exactly 180 degrees,
6769// Then the function should return "Straight angle"
68- // ====> write your test here, and then add a line to pass the test in the function above
6970const straight = getAngleType ( 180 ) ;
7071assertEquals ( straight , "Straight angle" ) ;
7172
7273// Case 5: Identify Reflex Angles:
7374// When the angle is greater than 180 degrees and less than 360 degrees,
7475// Then the function should return "Reflex angle"
75- // ====> write your test here, and then add a line to pass the test in the function above
76+ const reflex = getAngleType ( 250 ) ;
77+ assertEquals ( reflex , "Reflex angle" ) ;
0 commit comments