+ 2

Console is stopping at some point and the program won't working until restarting the Sololearn app

I have created a small game with arrays in javascript and table in html..the program create random numbers and put in table we have to arrange it. I have also added a NextSet button which creates another set of random numbers. This button is working fine with level 1 but in level 2 while clicking this button (about 1-7 times) the console is getting stucked and nothing works anymore..even after restarting the program nothing is showing except a blank page. It works only after restarting the whole app. Since the level 1 is working fine I think the problem is with random numbers generating function as it have some additional conditions in level 2 but I'm not sure as the console is not showing any error. If anyone know about this error please let me know if I can solve it without deleting the code. If you also think the problem is with random numbers then there is a function called Start() that is where the random numbers are created (the code is a bit lengthy) Please be careful while clicking the NextSet button.

13th Aug 2021, 8:25 AM
Arun Ruban SJ
Arun Ruban SJ - avatar
5 Respostas
+ 1
Arun Ruban SJ You are right the logic inside of the while loop that is a part of the start function is the problem (Level 2) Here it is in node, just the while loop, it should help you understand what is happening as the block is being executed and also help resolve the problem. https://code.sololearn.com/c62i9Q5VNIMz After the fact. https://code.sololearn.com/Wy8lEk091xwo/?ref=app
13th Aug 2021, 4:20 PM
ODLNT
ODLNT - avatar
+ 3
works fine for me.. there maybe some bugs from sololearn.. you can report them at info@sololearn.com ( attach some screenshots or recording to help them better )
13th Aug 2021, 8:48 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 2
Prashanth Kumar I have tried in pc too Chrome stopped working..even couldn't reload it. Only worked after closing the chrome and restarted. Did you actually try level 2...how many times you clicked the NextSet button??
13th Aug 2021, 8:59 AM
Arun Ruban SJ
Arun Ruban SJ - avatar
+ 1
I'm posting both level 1 and level 2 so that you can compare the Start() function.. Thank you!! https://code.sololearn.com/WRlgULnozHUM/?ref=app https://code.sololearn.com/W7zGL5aPfiNL/?ref=app
13th Aug 2021, 8:27 AM
Arun Ruban SJ
Arun Ruban SJ - avatar
+ 1
ODLNT I got it Thank you for your great effort
13th Aug 2021, 4:55 PM
Arun Ruban SJ
Arun Ruban SJ - avatar