Answer the question
In order to leave comments, you need to log in
How to disable the creation of new numbers?
I have numbers generated, and there is a check in the card for matches. When everything is filled horizontally and vertically, an alert pops up and after that everything should stop, but I continue to generate.
Code - https://codepen.io/anon/pen/JpORLP?editors=0010
Tell me how to fix it?
Answer the question
In order to leave comments, you need to log in
Before the alert, do clearInterval(timer);
, where timer is the ID of that timer with createBall.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question