Q1. What is Coffeescript ?
CoffeeScript is a little language that compiles into JavaScript. Underneath all of those embarrassing braces and semicolons, JavaScript has always had a gorgeous object model at its heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way
Q2. Which Languages Have The Most Impact On Coffeescript?
CoffeeScript has been inspired by Python, Ruby and Haskell, it adopted syntax & coding styles from them, which makes it very unique & Useful.
Q3. What Is The Difference Between Variables In Coffeescript And Javascript?
You have to add semicolon at the end of statements to execute variables in JavaScript while in CoffeeScript there is no need to add Semi-colon at the end of the statement.
Q4. List the Advantages of Coffeescript ?
The advantages of CoffeeScript :
There are numerous advantages over JavaScript, some of them are :
Q5. List the Disadvantages of CoffeeScript ?
Purpose of CoffeeScript is to remove all the rough edges from JavaScript and provides a smooth way of programming in JavaScript.
Q6. How variables differ in CoffeeScript than JavaScript?
For variables in JavaScript, you have to add semi-colon at the end of it to execute while in CoffeeScript there is no need to add Semi-colon at the end of the statement. Unlike, JavaScript, CoffeeScript adds up semi-colon with ease.
Q7. Explain functions in CoffeeScript?
Functions in CoffeeScript is an (Optional) list of parameters followed by an arrow and then the function body.
For example, log = (message) à console.log message
Q8. How CoffeeScript compiler is helpful in CoffeeScript?
CoffeeScript compiler ensures that within the lexical scope, all your variables are properly declared, and you never need to write “var” yourself
Q9. In CoffeeScript how clone-function is useful ?
Clone function is useful in creating a complete new object in Coffee Script by
Q10. Why Is Coffeescript Getting Popularity Day By Day?
CoffeeScript is the 11th most popular language in Github. Its main purpose is to produce efficient JavaScript without writing much code. It also focuses on highlighting all the good aspects of JavaScript with simple syntax.
Reasons behind the popularity of CoffeeScript:
Q11. What Is The Difference Between Copying An Object Through Assignment And Clone-function?
The main difference between copying an object through assignment and clone-function is that how they handle references. The assignment only copies the reference of the object while clone-function creates a complete new object.
Q12. How Coffeescript Interpolates The Strings?:
The concept of Interpolation in CoffeeScript is same as Ruby. Most expressions of CoffeeScript are valid inside the #{…} interpolation syntax.
Q13. How Does Boolean Works With Coffeescript?
in CoffeeScript is same as other but instead of “True” or “False”. In CoffeeScript, “True” is generally represented as “On” or “Yes” and “False” is represented as “Off” or “No
Q14. How can you map an array in CoffeeScript?
Coffee script has clean support for anonymous functions, to map an array in object use map() with an anonymous function. For simple mapping, list comprehension is more useful as Coffee script directly support list comprehensions.
Q15. Can you bind parameters to properties in CoffeeScript?
Yes, CoffeeScript allows to bind parameters to properties by using the @ shorthand, this also allows you to define class functions.