0

String operations

Which line of code produces an error? 3 + 4 '5' + 6 "7" + 'eight' "one" + "2" why is the answer ‘5’+6

29th Jul 2017, 6:19 PM
Carson Feng
Carson Feng - avatar
1 Answer
+ 5
All others are of the same type, so they can be added/concatenated no problem. But you can't add up an integer with a string.
29th Jul 2017, 6:41 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar