how to make a var and sprite in javascript

JavaScript
var name = createSprite(x,y,width,height);
Source

Also in JavaScript: