Yes, sure.
Here pieces of working code:
function tstClass()
{
this.items = [ "10", "20", "30" ];
this.find = function( itemToFind )
{
for ( var i = 0; i < this.items.length; i++ )
if ( this.items[ i ] == itemToFind )
return i;
return -1;
}
}
function tstObj()
{
var thing = new tstClass();
var result = thing.find( "10" );
if ( result == -1 )
Log.Message( "Item not found" );
else
Log.Message( "Item found at position " + result );
}
if you want not to expose array in your object, make it local in object constructor (remove this. prefix in all array references and define it as local variable).