Your SlideShare is downloading. ×
An Introduction to CoffeeScript
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

An Introduction to CoffeeScript

120
views

Published on

A CoffeeScript introduction presentation, which deals about the basic and basic concepts of CoffeeScript.

A CoffeeScript introduction presentation, which deals about the basic and basic concepts of CoffeeScript.

Published in: Education, Technology, Business

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
120
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. A Small Introduction..!
  • 2. Who am I? • rampicos.wordpress.com • twitter.com/rampicos • facebook.com/raamkumar.m • Code • Ramkumar Murugadoss
  • 3. What is CoffeeScript • CoffeeScript is a little language that aims to give you easy access to the good parts of JavaScript • One-third less code in order to generate the same JavaScript
  • 4. Why CoffeeScript • Increases readability • Eliminates syntactic clutters • Very less number of code lines to get much more javascripts • Get to know, because it is really popular
  • 5. History • On Christmas Day 2009, Jeremy Ashkenas first released CoffeeScript • On Christmas 2010 CoffeeScript 1.0 get released, with this release CoffeeScript became one of Github’s “most-watched” projects • In 2011, CoffeeScript was included in Ruby on Rails 3.1
  • 6. How it gets so much Popularity • The good parts like super functions, classes, etc.. are still there • The Compiler is present to help • It is all so clear
  • 7. Setting Env • Install Node.js for your platform • Goto Terminal/CMD • Execute “npm install -g coffee-script” • Use “coffee -v” to check CoffeeScript works and to know the version
  • 8. All set • “coffee –c <filename.coffee>” to compile coffee file to js file • “coffee -o output/folder -c Coffee/files/folder” to bulk compile coffee files to js files and store in specified folder
  • 9. Ready to Code • You don't need to declare variables with var • You don't need to use semicolons ; • Instead of using curly braces { } to surround blocks of code with indentation • Use @ for this • Use -> for function definition • Assign default values from function arguments
  • 10. Some Examples
  • 11. Much more • Functions • Objects and Arrays • Lexical Scoping and Variable Safety • If, Else, Unless, and Conditional Assignment • Splats... • Loops • Array Slicing and Splicing • Classes, Inheritance, and Super
  • 12. With jQuery Or
  • 13. Or Or
  • 14. Time is Yours