|
|
|
|
|
by BiteCode_dev
2309 days ago
|
|
Wow, I just tried: setInterval('console.log(1 + 1)', 1000);
And it works. It's a big eval().Stealing this for my next JS training, beginners always have a hard time with callbacks, so it's a good first step to actually explain the benefits of callbacks. |
|
When I was learning callbacks I saw people use the "setInterval" example and while it did help to an extent, the real world implementation still left a good deal to be desired.