A
A
Alex Polyakh2017-08-21 17:23:37
css
Alex Polyakh, 2017-08-21 17:23:37

How to return the value of a variable from the setTimeout/setInterval -function?

It is necessary to return a value from the setTimeout/setInterval function and pass the result further.
Now I get undefined
Example on codepen https://codepen.io/PolyakhAlex/pen/dzmLoP

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Ragtime Kitty, 2019-04-23
@SergeiB

Through pseudo and additional element.
Depends on where it will be placed, of course, but something like this:
You can still through the wrapper and flex

M
Maxim Timofeev, 2019-04-23
@webinar

We shift the title with a negative margin upwards and make a border through the pseudo-element, except for the top one.

D
denismaster, 2017-08-21
@PolyakhAleksandr

Use Promise / async-await Luke!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question