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 Basics (Retired) Introducing JavaScript About JavaScript Basics

jason chan
jason chan
31,009 Points

What's the difference between coffeescript vs javascript?

What's the difference between coffeescript and javascript? Should I learn coffeescript because I don't like curlies?

5 Answers

CoffeeScript is basically just a shorthand form of JavaScript. It's used by JavaScript developers who enjoy the readability it adds to their code -- increasing productivity by writing, and reading, less code in any given program.

Although your source CoffeeScript code may look a little different in terms of syntax (no curly braces etc.), it does get transcomplied (translated in a sense) to full JavaScript -- which is when it becomes executable in an environment like a web browser. Similar to how Sass/LESS get transcompiled to CSS.

So, I think you'll find it extremely important to learn JavaScript first, since it will be very difficult (or sometimes impossible) to debug your programs without an understanding of the underlying language.

With patience, you will eventually get used to curly braces. :-)

Tantalizea Lacaden
Tantalizea Lacaden
1,890 Points

I thought the question was just a joke! Good to know what CoffeeScript is :)

Just a comment, I didn't even know there was a coffeescript...interesting play on the name...now of course I'm wondering if there'll be things like Americanoscript or Mochascript to cover some other areas that Java or Coffee scripts don't. Apparently programmers like their coffee! :-D

Well Abbymann, you'll be happy to hear that there already is a JavaScript test framework called "Mocha"... which runs "Chai" assertions, of course.

But, I think you've really struck gold with "AmericanoScript"! Personally, I'm looking forward to "OrangeMochaFrappuccinoScript" myself.

^ underrated comment is underrated! Thanks for the laugh. Y'all are a lot more fun than those boring ole' dotards in Vinti-half-caff-caramel-vanilla-soy-latte-Script.

Godfrey M
PLUS
Godfrey M
Courses Plus Student 2,696 Points

hi developers this is interesting hahaha .. mochascript ,chaiscriptf..funny , the best would be expressoscript because this tough as programing .hands down to develop it and good luck to ya 'all

and here I thought teascript would be great. Must it always be coffee?

love the names, really