I know how promises and callbacks work in node js but I am very confused about how to capture custom events.
Let's say I have a global variable x
var x = 10
Some asynchronus functions in the event loop update value of x. How can I capture variable x having a particular value? Like what should I do when I want to run a function
foo()
when variable x attain a value of let's say 50?
via smart.Waqar
No comments:
Post a Comment