var resultConcatenated = stringValue + intValue; // 11
var resultAdded = intValue + stringValue; // 2
So i thought ... hey i got it but it fails ... they still remain concatenated... has this something to do with the fact that i am using labels ?
any help would be welcome...
var resultAdded = intValue + parseInt(stringValue);
parseInt() is a pre-defined global method.
Is it simplier to do this?
var resultAdded = intValue*1 + stringValue*1;
Since * is the operator for number, the stringValue*1 would return the int value.