Anyone can fix this it's for solving math problem
Here the html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>LOL</title> <script src="lol.js"></script> </head> <body> <input type="number" id="in0"> <br> <br> <input type="number" id="in1"> <br> <br> <button onclick="solve()">Solve</button> <p id="ok">g</p> <input type="number" id="wew"> <script src="lol.js"></script> </body> </html> And the js function solve(){ var mult = 1 var val = parseInt(document.getElementById("wew").value) var start0 = parseInt(document.getElementById("in0").value) var end0 = parseInt(document.getElementById("in1").value) solve0 = start0 - end0 show = document.getElementById("wew") show.value = solve0 for (start0; start0 < val; start0++) { mult = mult * start0 } alert("Answer =" +mult) }