> For the complete documentation index, see [llms.txt](https://bharat-tiwari.gitbook.io/our-tech-journal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bharat-tiwari.gitbook.io/our-tech-journal/javascript/function-expressions-vs-function-statements.md).

# Function expressions vs Function statements

function expressions and function statements are very similar in JavaScript, the difference is how the browser loads them into the execution context.

```javascript
// function statement
function foo() {
}

// function expression
var foo = function() {
};
```
