+ 2
Help! Why it’s not working?
function Gfriends(talent, job, flaw) { this.talent = talent; this.job = job; this.flaw = flaw; } var Elizabeth = new Gfriends('Great Cook!', 'Developer', 'too cold'); var Kelly = new Friends("Music", 'Data Scientest', 'too sexual'); Alert(Elizabeth, Kelly);
6 Réponses
+ 6
1. in Kelly’s decleration it should be Gfriends, not Friends.
2. the objects of the alert should have + between them not , .
3. You should state what element to alert (i.e. job or flaw) or the alert will just state that it’s an object...
+ 5
BTW - when asking a question - it’s better if you give a clue to what programing language is the question reffering to - so people will consentrate on the question and not on guessing the programing language...
+ 5
1. You still have a F instead of a f...
2. You still have a , instead of a +...
+ 5
function Gfriends(talent, job, flaw) {
this.talent = talent;
this.job = job;
this.flaw = flaw;
}
var Elizabeth = new Gfriends('Great Cook!', 'Developer', 'too cold');
var Kelly = new Gfriends("Music", 'Data Scientest', 'too sexual');
document.write(Elizabeth.job + ' ' + Kelly.talent);
+ 1
Ronen thank you so much. I fixed everything you said but it’s still not working:
——————-
function Gfriends(talent, job, flaw) {
this.talent = talent;
this.job = job;
this.flaw = flaw;
}
var Elizabeth = new Gfriends('Great Cook!', 'Developer', 'too cold');
var Kelly = new GFriends("Music", 'Data Scientest', 'too sexual');
document.write(Elizabeth.job, Kelly.talent);
+ 1
Can’t thank you enough. you are a master!! 🙏