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, 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
Steven Parker
231,269 Points

You 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?

thanks 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
Steven Parker
231,269 Points

That looks the same, what did you have to change?

i jst changed the quotes from " " to ' '

Steven Parker
Steven Parker
231,269 Points

That's very odd, JavaScript allows either type and treats them the same way.