The problem is, I have no idea why this code doesn't work. I searched everywhere!
What this code does, is to take information from a number box, then display a message if the users inputs text(an error), and display a success message, if the user inputs number.
HTML ->
<input type="number" id="number">
<button onclick="makeTrack()">Make Track</button>
<div><div>
JS -> Where the problem starts!
function makeTrack() {
var e = document.getElementById("number").value;
if(typeof e === "number";) {
alert("It works!");
} else if(typeof e === "string") {
alert("Please input a number!");
}
}