Suppose I have a function:
function test(){
//should I define global variable here
//like window.arr=new Array()?
}
//can I define here
//window.arr=new Array()?
test.prototype.method01=function(){
//or here:window.arr=new Array()?
}
Of the three ways above, which one is better?
windowobject.