()
| 1 | function ArmstrongChecker() { |
| 2 | value = document.getElementById("inp").value; |
| 3 | |
| 4 | if (value == ""){ |
| 5 | document.getElementById("text").innerText = "Type something !"; |
| 6 | return false; |
| 7 | } |
| 8 | var sum = 0; |
| 9 | for (var i = 0; i < value.length; i++) { |
| 10 | sum += Math.pow(parseInt(value[i]), 3); |
| 11 | } |
| 12 | |
| 13 | if (sum == parseInt(value)) |
| 14 | document.getElementById("text").innerText = "It's an Armstrong Number"; |
| 15 | else |
| 16 | document.getElementById("text").innerText = "It's not an Armstrong Number"; |
| 17 | } |
| 18 | function myFunction() { |
| 19 | document.getElementById("form").reset(); |
| 20 | document.getElementById("text").innerText = " "; |
nothing calls this directly
no outgoing calls
no test coverage detected