How to pause/stop Animations

Can’t we pause or stop animation like told in the documentation ?

what I tried

this.object.getComponent('animation').animation.stop();

what I got

TypeError: this.object.getComponent(...).animation.stop is not a function

this.object.getComponent(‘animation’).stop() should work

thanks !