i was wondering is it possible to return multiple values from a prototype object. I need to return the value of several arrays and call those at a later point. Below is an example of my code.. I can show a JSFiddle if needed..Thankss!!
EmployeeObj.prototype.showEmployee = function(emPhoto0,emPhoto01){
var employeePhoto = new Array();
employeePhoto[emPhoto0] = new Image();
employeePhoto[emPhoto0].src = "pics/taylor.jpg";
employeePhoto[emPhoto01] = new Image();
employeePhoto[emPhoto01].src = "pics/roger.jpg";
var showPhoto1 = employeePhoto[emPhoto0];
var showPhoto2 = employeePhoto[emPhoto1];
return showPhoto1;
return showPhoto2;
};
emPhoto0andemPhoto01have? On anArray, they should be integers - if they're not, you should use anObject.