Can someone explain me how? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can someone explain me how?

For real, from where those numbers are coming from? 😂 https://code.sololearn.com/WYuYzLiLJYRX/?ref=app PS: Press Begin over and over again

17th Apr 2019, 9:42 PM
Grasshopper Hell Monkey
Grasshopper Hell Monkey - avatar
5 Answers
+ 4
Grasshopper Hell Monkey The problem is on line 50. o.innerHTML = bunch.push(" "); When the push function is executed a Number is returned That Number, represents the new length of the array. https://www.w3schools.com/jsref/jsref_push.asp [Edit] At line 80 the onclick event handler evokes the print function twice hence the appearance of counting by two. It doesn't matter that there is an empty string inside of the push function. https://code.sololearn.com/W7R81F004VK5/#html
18th Apr 2019, 3:30 PM
ODLNT
ODLNT - avatar
+ 4
What numbers ?
17th Apr 2019, 10:08 PM
SalimLouDev
SalimLouDev - avatar
+ 3
Hey Grasshopper Hell Monkey ! Currently, it's a little difficult to understand what you may need help with, so clarifying a bit would help get you the best answer https://www.sololearn.com/discuss/333866/?ref=app
17th Apr 2019, 10:43 PM
Faisal
Faisal - avatar
+ 1
Thanks for the further explanation.
20th Apr 2019, 2:01 PM
Grasshopper Hell Monkey
Grasshopper Hell Monkey - avatar
0
Sorry guys, i forgot to add the code 😅
17th Apr 2019, 10:58 PM
Grasshopper Hell Monkey
Grasshopper Hell Monkey - avatar