Back to questions
JuniorTheoryCommon
What does the program print (lines separated by spaces)?
Сообщить("5" + 3);
Сообщить(3 + "5");53 8
- Expecting
8twice, as if+always adds when a number is involved: with a string on the left+joins strings - Expecting a string on either side to make
+join: with a number on the left the string is converted to a number and added
- What happens to
3 + "5шт"when the string is not a number? - How do you add a number to a string explicitly with
Число()orСтрока()?