Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
jes cahn-thompson
Front End Web Development Techdegree Student 6,719 PointsJavascript function conundrum
Can anyone help me with this? I'm stumped...
Define a function createApp which takes your info and education as arguments in that order. The function should then return an object (you'll need to create it). This object should have two properties. The property names must be the same as your variable names. Set the values of these properties to the corresponding arguments.
1 Answer
Colin Bell
29,679 PointsIt's easier to answer questions like this when you link to the actual challenge, but I believe it's asking for something like this:
function createApp (info, education) {
this.info = info;
this.education = education;
return {
info : this.info,
education: this.education
}
}
Milo Winningham
Web Development Techdegree Student 3,317 PointsMilo Winningham
Web Development Techdegree Student 3,317 PointsThis will work, but you don't have to set
this.infoandthis.education; you can use theinfoandeducationarguments directly in the returned object.Also, to link your question to the challenge like Colin suggested, you can post your question using the Get Help button on the Code Challenge page.
jes cahn-thompson
Front End Web Development Techdegree Student 6,719 Pointsjes cahn-thompson
Front End Web Development Techdegree Student 6,719 PointsPerfect! Thanks so much Colin.
jes cahn-thompson
Front End Web Development Techdegree Student 6,719 Pointsjes cahn-thompson
Front End Web Development Techdegree Student 6,719 PointsThanks Milo!