Please, explain step by step | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please, explain step by step

Why does output equals to 4? https://code.sololearn.com/Wf720i5mVD0A/?ref=app

2nd Jun 2019, 8:25 PM
Vladyslav Semeniuk 🐸
Vladyslav Semeniuk 🐸 - avatar
1 Answer
+ 7
If you enter a number as the key of an object, it becomes a string. Therefore, the second value of "0" replaces the first.
2nd Jun 2019, 9:34 PM
InvBoy [ :: FEDE :: ]
InvBoy [ :: FEDE :: ] - avatar