1515// execute the code to ensure all tests pass.
1616
1717function getAngleType ( angle ) {
18- if ( angle === 90 ) {
19- return "Right angle" ;
20- }
21- if ( angle < 90 ) {
22- return "Acute angle" ;
23- }
24- if ( angle > 90 && angle < 180 ) {
25- return "Obtuse angle" ;
26- }
27- if ( angle === 180 ) {
28- return "Straight angle" ;
29- }
30- return "Reflex angle" ;
18+ // TODO: Implement this function
3119}
3220
3321// The line below allows us to load the getAngleType function into tests in other files.
@@ -47,27 +35,3 @@ function assertEquals(actualOutput, targetOutput) {
4735// Example: Identify Right Angles
4836const right = getAngleType ( 90 ) ;
4937assertEquals ( right , "Right angle" ) ;
50-
51- // Case 2: Identify Acute Angles:
52- // When the angle is less than 90 degrees,
53- // Then the function should return "Acute angle"
54- const acute = getAngleType ( 45 ) ;
55- assertEquals ( acute , "Acute angle" ) ;
56-
57- // Case 3: Identify Obtuse Angles:
58- // When the angle is greater than 90 degrees and less than 180 degrees,
59- // Then the function should return "Obtuse angle"
60- const obtuse = getAngleType ( 120 ) ;
61- assertEquals ( obtuse , "Obtuse angle" ) ;
62-
63- // Case 4: Identify Straight Angles:
64- // When the angle is exactly 180 degrees,
65- // Then the function should return "Straight angle"
66- const straight = getAngleType ( 180 ) ;
67- assertEquals ( straight , "Straight angle" ) ;
68-
69- // Case 5: Identify Reflex Angles:
70- // When the angle is greater than 180 degrees and less than 360 degrees,
71- // Then the function should return "Reflex angle"
72- const reflex = getAngleType ( 340 ) ;
73- assertEquals ( reflex , "Reflex angle" ) ;
0 commit comments