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.
Once they do, you show the problems with it and show why callbacks are better.
When it comes to pedagogy, I'll use every trick I can.
And I always win.
If your way works, then it works though I suppose.