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 trialcharles phiri
13,268 Pointsjavascript, conditional statement
var a = 10; var b = 20; var c = 30; if (a > b){ alert( "a is greater than b." );
}else{ alert( "a is NOT greater than b." ); } it's giving me a bummer, how best to answer it
2 Answers
Steven Parker
231,269 PointsYou forgot to provide a link to the course page. Are you sure the instructions asked for the function to show an"alert" message? Perhaps it wanted a messages to be "retturn"ed instead?
charles phiri
13,268 Pointsi jst changed the quotes from " " to ' '
Steven Parker
231,269 PointsThat's very odd, JavaScript allows either type and treats them the same way.
charles phiri
13,268 Pointscharles phiri
13,268 Pointsthanks bro, finally it accepted the answer i provided var a = 10; var b = 20; var c = 30; if (a > b){ alert( 'a is greater than b.' );
}else{ alert( 'a is NOT greater than b.' ); }
Steven Parker
231,269 PointsSteven Parker
231,269 PointsThat looks the same, what did you have to change?