You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var guy1 = new Person('Miro1');
var guy2 = new Person('Miro2');
list=[guy1,guy2]
for(var i in list){
var item = list[i];
item.say('hi'); // i just got : say is not a function
}
`
The text was updated successfully, but these errors were encountered:
`
var Person = Class.create();
Person.prototype = {
initialize: function(name) {
this.name = name;
},
say: function(message) {
return this.name + ': ' + message;
}
};
var guy1 = new Person('Miro1');
var guy2 = new Person('Miro2');
list=[guy1,guy2]
for(var i in list){
var item = list[i];
item.say('hi'); // i just got : say is not a function
}
`
The text was updated successfully, but these errors were encountered: