Question: JavaScript implementation of an animated rectangle Handy tools (if required) Implement animatedRect, use import from rxjs and rxjs/operators are required Exercise 6- An Animated Rect
JavaScript implementation of an animated rectangle

Handy tools (if required)


Implement animatedRect, use import from "rxjs" and "rxjs/operators" are required

Exercise 6- An Animated Rect hide instr We have provided you a function animatedRectTimer which animates a rectangle to move across the screen smoothly for one second, using imperative constructs. Your job is to achieve the same animated behaviour using observables. Complete the function animateRect and replace the call to animatedRectTimer (at the end of the code file) with a call to your animateRect. Hint: Observable.subscribe return an unsubscribe function(as well as other things) which you will need to use!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
