javascript typecasting

Tagged:  

In case you want to make sure javascript wants to add two values instead of concaternating them when you use "+" you can make them act as an int for example with parseInt:

a+1 might concaternate
parseInt(a) + parseInt(1) will add