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 trialtaylor hardie
89 Pointsnot sure why this wont work? any takers
var myName = "Taylor"; var myAge = 33; var response = prompt (myName) + "is " (myAge);
var myName = "Taylor";
var myAge = 33;
var response = prompt(myName)+ "is " + (myAge);
alert response
1 Answer
vincent batteast
51,094 Pointsvar myName = "Taylor";
var myAge = 33;
var response = myName + " is " + (myAge);
alert(response);
just a couple of things.
- alert is a function so you need () and anything your function need to work with goes in the ()
- you need a space before is or it will look like this in the alert window toyloris 33
all in all good stuff. happy coding.