Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x() {
- const tryouts = [500, 1000, 2000];
- const increaseTryoutIndex = () => {
- tryoutIndex += 1;
- };
- /* remove odd elements */
- const recursiveSetter = timeout => {
- setTimeout(() => {
- if (tryouts[tryoutIndex + 1] && ненайдено) {
- /* retry */
- делать_чтото
- increaseTryoutIndex();
- recursiveSetter(tryouts[tryoutIndex]);
- }
- }, timeout);
- };
- recursiveSetter(tryouts[tryoutIndex]);
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement