July 2017
Intermediate to advanced
354 pages
9h 58m
English
A function is a set of instructions that perform a given action. They describe functionalities such as performing calculations, manipulating objects, using other functions, and more. Parameters can be used to make functions reusable. For example, a function to move objects can take the destination coordinates as parameters. When we call a function we will pass arguments for these parameters, and the function will perform its routine, being able to make use of these values. The syntax of a function in CoffeeScript is formed by a word, an equal symbol, a list of parameters between parentheses, a hyphen and a symbol of "greater than" forming an arrow, and the body of the function.
Here's an example of CoffeeScript code. If you come ...