Introduction – CoffeeScript Tutorial
CoffeeScript can communicate easily with Node.JS and ruby on rails applications. So CoffeeScript extends the reliability and the area of use.
Overview – What is CoffeeScript?
Origin of CoffeeScript
CoffeeScript first appeared in 2009 designed and developed by Jeremy Ashkenas. CoffeeScript was inspired by many high-level programming languages like, Python, Ruby, Haskell, Perl, YMAL, etc that’s why it provides very high-level syntax that made CoffeScript very easy to learn and understandable. See below why you should learn CoffeeScript.
Why you should learn CoffeeScript
- Human readable: As CoffeeScript is inspired by many high-level languages, it is super easy to read and maintainable codes.
- Reliable: CoffeeScript can easily communicate with Python, Ruby, and nodeJS apps. So CoffeeScript is very extendable for writing powerful web apps.
- Extended library support: You can do more stuff by including and writing rich library functions.
A simple CoffeeScript Program
In the below CoffeeScript program, we have printed out the natural numbers 1..10 using the loop. You don’t need to figure out what is happing right now, but keep in mind that you can write many complex programs by using the near plain language syntax.
count = 0 while count < 10 console.log "Index : " + count count++;
If you transcompile and run the following code you will get
> Index: 2
> Index: 3
> Index: 4
> Index: 5
> Index: 6
In the next subsequent tutorials, we will learn CoffeeScript from most basic concept to advanced programming concept. Let’s start!