Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Quickstart Data Types and Variables Creating Variables

not 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
vincent batteast
40,217 Points
var myName = "Taylor";
var myAge = 33;
var response = myName + " is " + (myAge);

just a couple of things.

  1. alert is a function so you need () and anything your function need to work with goes in the ()
  2. 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.