Skip to content

Commit d8135a7

Browse files
committed
feat: finished part_d
1 parent 48c7839 commit d8135a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lesson_07/conditionals/src/part_d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ export function isWithinRange(num: number, min: number, max: number): boolean {
2323
* @returns
2424
*/
2525
export function isValidTriangle(a: number, b: number, c: number): boolean {
26-
if (a + b > c || a + c > b || b + c > a) {
26+
if (a + b > c && a + c > b && b + c > a) {
2727
return true;
28+
} else {
29+
return false;
2830
}
29-
return false;
3031
}
3132

3233
/**

0 commit comments

Comments
 (0)