Animation

To animate an object, we can use setTimeout() to impose a small delay between frames. We can also use the requestAnimFrame shim which enables the browser to determine the optimal FPS.

See the Pen Untitled by Web Coding Center (@webcodingcenter)on CodePen.