I want to take three values in from the user and perform various basic mathematical operations on them. I am taking input like this: var firstnumber = prompt("blah blah... var secondnumber = prompt("blah blah... and then adding them together like this var result = firstnumber+secondnumber However this just concatenates the values as if they were strings, e.g. if you entered "7" and "3" instead of getting 10 you get 73! I know how to add them if I hard-coded the variables, but I want the user to input them.
You can use parseInt or parseFloat functions to do it. var result = parseInt(firstnumber)+parseInt(secondnumber)