enate = oneString + oneInt //Results in "11"
var oneAddition = oneInt + oneString //Results in 2
In the first addition statement, the first operator is a string. JavaScript assumes that the operation is to join two strings. When JavaScript encounters an integer in the second operator, it converts the variable to a string to meet its own expectations.
Since JavaScript does not maintain any methods or properties to determine the current type for a variable, it is important to monitor the use of variables closely to avoid unexpected results.