This commit is contained in:
Matthew Grove
2018-11-13 19:35:10 +00:00
parent b3947cce47
commit 9bbc04f8e3

View File

@@ -1,4 +1,4 @@
window.activated_drawer_item_link = "/luhn-algorithm/"; window.activated_drawer_item_link = "/luhn-algorithm";
document.addEventListener("keyup", function(event) { document.addEventListener("keyup", function(event) {
// stop any code that may normally run when enter key pressed // stop any code that may normally run when enter key pressed
@@ -25,7 +25,7 @@ function checkNumber() {
} }
sum += newDigit; sum += newDigit;
}); });
// displays evaluation message // displays evaluation message
$("#validation_message").html(((sum % 10) == 0) ? "Number is valid" : "Number is invalid"); $("#validation_message").html(((sum % 10) == 0) ? "Number is valid" : "Number is invalid");
} }