Does it convert "5" to a number, and add the two arguments to produce the number 11 (Perl, PHP)?
Does it fail to compile this program or run the code, saying that the two operands have incompatible type (C)?
"5" + 6
Having a little more fun with this example, we will explore the
parseInt function. Learn more about this function.
In the Chrome Inspector, enter the following to set the value of the variable
var foo = parseInt("5", 10) + 6
Then to retrieve this value, simply type in
foo. It should return the value of
11. But wait, why did this happen?
radix. In this example, the
10. The syntax for this is:
Learn more about different language types.