Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
Jordan The value of variable Y is 8, which you typecasted in the same variable and then added 2 to 8 which is now a string and as Angelo said strings are concatenated not added, so: '8'+'2' = 82
15th Feb 2021, 2:01 AM
∆BH∆Y
∆BH∆Y - avatar
+ 2
Where does the 7 come from? Btw remember that "ab" + "cd" == "abcd" So "8" + "2" == "82"
14th Feb 2021, 6:30 PM
Angelo
Angelo - avatar
+ 1
It's not 8, it's "8"
14th Feb 2021, 6:35 PM
Angelo
Angelo - avatar
0
One tip: No two variables should be same in a program
15th Feb 2021, 2:03 AM
∆BH∆Y
∆BH∆Y - avatar