> For the complete documentation index, see [llms.txt](https://javascript-1.gitbook.io/javascript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://javascript-1.gitbook.io/javascript/functions.md).

# Functions

* Programs are assigning the values to the memory or variables and running the program to do somethings with the variables.
* without functions programs can't do anything.

Function Expression:

```javascript
var canada = function() {
    console.log("cold");
}
```

Function Declaration:

```javascript
function india() {
    console.log("warm");
}
```

Function Invocation/Call/Execution:

```javascript
canada(); // defined at run time that what this function does
india();  // defined at parse time - hoisting
```

* Function invocation will create an Execution context that gives an this (=window) and arguments object.
