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
Danny Percy
3,719 PointsCan somebody check out my code?
var answer=false; var tripCost=100; //In Dollars to New York var secondTrip=50; //In Dollars to Los Angeles var tripName= 'New York'; var secondTripName='Los Angeles'; var quest=prompt('How much money do you have?');
if (quest===tripCost){ answer=true; }else if (quest > tripCost){ answer=true; }else if (quest < tripCost){
}
if (answer){ document.write('You are lucky! You can book your ticket today for ' + tripName); }else { document.write('With this money you can only visit ' + secondTripName); }
console.log('Script works perfectly');
1 Answer
phillip parker
10,673 PointsHi, it would help if you could put it in a more readable format. See the "Markdown Cheatsheet" for formatting help. Are you having a problem with it?