W
W
WarriorKodeK2018-02-16 00:27:03
JavaScript
WarriorKodeK, 2018-02-16 00:27:03

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

1 answer(s)
S
Stalker_RED, 2018-02-16
@WarriorKodeK

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 question

Ask a Question

731 491 924 answers to any question