String operations | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Resposta
+ 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