From 187f2f581d65069cb8cf2792896b79777bfcb6a4 Mon Sep 17 00:00:00 2001 From: didier amyot Date: Fri, 20 Oct 2023 19:24:52 -0400 Subject: [PATCH] ss --- exercice_001/exo1.html | 2 +- exercice_001/exo1.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/exercice_001/exo1.html b/exercice_001/exo1.html index cfe32a3..0d531c4 100644 --- a/exercice_001/exo1.html +++ b/exercice_001/exo1.html @@ -79,7 +79,7 @@
- +
diff --git a/exercice_001/exo1.js b/exercice_001/exo1.js index 8363314..76c975f 100644 --- a/exercice_001/exo1.js +++ b/exercice_001/exo1.js @@ -4,3 +4,18 @@ function exo1b(){ let userInput = document.getElementById("input-1").value; document.getElementById("result-box-1").innerText = userInput; } + +function getInputEqualityMessage(input1, input2){ + if(input1 === input2){ + return "input-1 = input-2"; + } + return "input-1 != input-2"; +} + +function exo1c(){ + let input1 = document.getElementById("input-1").value; + let input2 = document.getElementById("input-2").value; + + document.getElementById("result-box-2").innerText = getInputEqualityMessage(input1, input2); + +} \ No newline at end of file