+ 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);

16th Oct 2018, 8:52 PM
Emad El Sammad
Emad El Sammad - avatar
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...
17th Oct 2018, 11:24 AM
Ronen Gil רונן גיל رونين جيل 🏳️‍🌈♾🇹🇩🇮🇱
Ronen Gil רונן גיל رونين جيل 🏳️‍🌈♾🇹🇩🇮🇱 - avatar
+ 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...
17th Oct 2018, 11:28 AM
Ronen Gil רונן גיל رونين جيل 🏳️‍🌈♾🇹🇩🇮🇱
Ronen Gil רונן גיל رونين جيل 🏳️‍🌈♾🇹🇩🇮🇱 - avatar
+ 5
1. You still have a F instead of a f... 2. You still have a , instead of a +...
17th Oct 2018, 4:26 PM
Ronen Gil רונן גיל رونين جيل 🏳️‍🌈♾🇹🇩🇮🇱
Ronen Gil רונן גיל رونين جيل 🏳️‍🌈♾🇹🇩🇮🇱 - avatar
+ 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);
17th Oct 2018, 4:28 PM
Ronen Gil רונן גיל رونين جيل 🏳️‍🌈♾🇹🇩🇮🇱
Ronen Gil רונן גיל رونين جيل 🏳️‍🌈♾🇹🇩🇮🇱 - avatar
+ 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);
17th Oct 2018, 1:38 PM
Emad El Sammad
Emad El Sammad - avatar
+ 1
Can’t thank you enough. you are a master!! 🙏
17th Oct 2018, 9:42 PM
Emad El Sammad
Emad El Sammad - avatar