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

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

scripts.js
var myName = "Taylor";
var myAge = 33;
var response = prompt(myName)+ "is " + (myAge);
alert response

1 Answer

vincent batteast
vincent batteast
51,094 Points
var myName = "Taylor";
var myAge = 33;
var response = myName + " is " + (myAge);
alert(response);

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.