In most of my scripts concerning math operators, I use prompts. The bad thing about prompt variables is that, although you can subtract, multiply, and divide them normally, addition treats the variables as strings, and does not add the values. This has proven to be an annoying problem, and although I have found a solution through loops and an if statement, suffice to say it is inconvenient, and does not work with decimals. I noticed that when I declared the variables myself, they are added as numbers not strings, because the variable is a number. Is there a way to make a variable declared through prompt a definite number so addition does not add strings?
PS: By prompt I mean
var a = prompt("Type in a number here", "")
var currentTime = new Date()
var chance = currentTime.getTime()
var chance2 = chance % 3