()
| 1 | function factorial () { |
| 2 | |
| 3 | const x = document.getElementById("number").value; |
| 4 | |
| 5 | let fact = 1; |
| 6 | for (let i=1; i<=x; i++) { |
| 7 | fact = fact * i; |
| 8 | } |
| 9 | |
| 10 | document.getElementById("answer").innerHTML = `${x}! = ${fact}`; |
| 11 | } |
nothing calls this directly
no outgoing calls
no test coverage detected