Code Example: Animated Sprite

Can someone provide a way to animate a sprite with the HTML5 framework using the smallest amount of javascript?

XIE XIE

I see things like this

cc.SpriteFrameCache.getInstance.addSpriteFrames;

and then i see things like the one below
I am not sure at all what to use

*var shipTexture = cc.TextureCache.getInstance.addImage;
this.initWithTexture);
this.setTag;
this.setPosition;
// set frame
var frame0 = cc.SpriteFrame.createWithTexture);
var frame1 = cc.SpriteFrame.createWithTexture);
var animFrames = [];
animFrames.push;
animFrames.push;
// ship animate
var animation = cc.Animation.create;
var animate = cc.Animate.create;
this.runAction);
*