...

/

Exercise: Ticker

Exercise: Ticker

Practice how to emit an event and count the number of ticks after invoking a function.

Problem statement

Write a function that accepts a number and a callback as the arguments. The function should return an EventEmitter instance that emits an event called tick every 50 milliseconds until the number of milliseconds is passed from the invocation of the function. The function should also call the callback when the number of milliseconds has passed, providing the ...