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
Siddharth GS
2,698 PointsMy solution for this challenge - I did it just like our teacher said :)
Hello everyone ,
To make it into a better way to write this program - try like our professor said - I did my very first own code as he taught. Split up your code to make it easy and understandable -> It's awesome. Check ma code - i hope it helps
console.log("Begin Program");
var name = prompt("What is your name?");
var age = prompt("What is your age?");
var ambition = prompt("What is your ambition?");
var food = prompt("What is your favorite food?");
var future = prompt("Where you wanna see yourself in the future?");
alert("Are you sure that you've finished with your story?");
var result = " My name is " + name;
result += " and I'm" + age + "years old.";
result += " My ambition is to become a" + ambition;
result += " My favorite food is " + food;
result += " and I want to see myself as " + future.toUpperCase();
document.write(result);
console.log("End Program");
1 Answer
Alexander Davison
65,469 PointsGood job
Siddharth GS
2,698 PointsSiddharth GS
2,698 PointsThank you :)