Is that the original state of the template you were handed, or have you added to it?
If all you're doing is displaying the numbers, then there's no real need even to store them.
function Lottery( count, max )
this.balls = new Array();
this.freshSet = freshSet;
this.freshSet( count, max );
function freshSet( ballCount, maxNumber )
var ballSet = ;
for (var k=0; k<maxNumber; k++ )
ballSet[k] = k+1;
for( var i = 0; i < ballCount; i++ )
this.balls.push( ballSet.splice( Math.floor( Math.random() * ballSet.length ), 1 ) );
var newballs = new Lottery( 6,49 );