This commit is contained in:
Philippe Torrel
2026-08-18 14:27:34 +02:00
parent c7d26e1cd9
commit c6d9611e81
35 changed files with 1852 additions and 130 deletions

View File

@@ -0,0 +1,14 @@
// logical error
function findMaximum(a, b, c) {
if (a > b && a > c) {
return a;
} else if (b > a && b > c) {
return b;
} else {
return c;
}
}
console.log(findMaximum(1, 2, 3)); // => 3
console.log(findMaximum(102, 59, 18)); // => 102
console.log(findMaximum(532, 532, 345)); // => 532