1let previous_value;
2
3document.getElementById("input").addEventListener("change", function() {
4 let value = document.getElementById("input").value;
5 if (previous_value > value) {
6 console.log("Decreased");
7 } else if (previous_value < value) {
8 console.log("Increased");
9 }
10 previous_value = value;
11});