I am learning to code in JavaScript. I am programming something with some timed mouse animation. I\'m just about to add some code which draws the mouse path.
you can use them if you are 100% sure that it is the exact time you need you. if it is an ambiguous situation then not to use it. if you are using a javascript framework look for a lifecycle hooks e.g in angular use Angular life cycle hooks.