Code runs incorrectly from public replit Play Button

I’ve created a repl which generates a number array and then determines the two most frequently generated numbers. When I run the code in my own replit editor or fork it and run it, the code runs as expected.

However, from the public play button ( ), it prints “Number Array” 50+ times, generates multiple batches of random numbers, and then finally executes the code as expected.

You can fork it for yourself and see it run correctly. Can someone explain why it’s behaving strangely from the public screen?

Hey @EricDiMarzio! Welcome to the community!

That does not seem to be happening at my side. However, I suspect its a latency issue on your sode and its just sending multiple requests to run your Repl, which causes to repeatedly print out the result.

Reload the cover page or connecting to a better internet connection should fix the problem.


For me it now runs only one extra number array before proceeding correctly. I think you’re right. Thank you!

If your problem is now solved, please mark their post as the solution.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.