reverse

The Animation.reverse() method of the Animation Interface reverses the playback direction, meaning the animation ends at its beginning.

MDN Reference