What Is CoffeeScript?
The main purpose of CoffeeScript is –
ü Write simple and better code
ü More relevant syntax and
CoffeeScript was designed and developed by Jeremy Ashkenas in Dec, 2009.
Jeremy Ashkenas was inspired by Python, Ruby and Haskell and it adopted syntax and coding styles from them which makes it very useful and unique.
1. Filename extensions- coffee, .litcoffee
2. First appeared- Dec 13, 2009
3. Stable release- 2.0.0 / Sep 18, 2017
4. Designed by- Jeremy Ashkenas
6. License- MIT License
The CoffeeScript Latest Version is - 2.2.2
1. Install locally for a project - npm install --save-dev coffeescript
2. Install globally to execute .coffee files - npm install --global coffeescript
What Are the basic rules to remember for CoffeeScript?
The Rules for CoffeeScript is -
1. Whitespace matters
2. No parentheses
3. Contains lightweight add-ons.
What Are the disadvantages of CoffeeScript?
2. Only limited resources are available for CoffeeScript.
What's New In CoffeeScript 2?
Major new features in CoffeeScript 2 are -
1. CoffeeScript 2 include async functions
2. CoffeeScript 2 include JSX
What Is function in CoffeeScript?
A function in CoffeeScript is an Optional list of parameters followed by an arrow (->), and then the function body.
The example looks like-
// square = (x) -> x * x
// cube = (x) -> square(x) * x
// log = (message) -> console.log message
Why Is CoffeeScript getting popularity day by day?
Reasons behind the popularity -
Is it possible to bind parameters to properties in CoffeeScript?
Yes!, you can bind parameters to properties in CoffeeScript by using @ shorthand and It can also be used to define class functions.