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

# Day 1: Functions

### Problem Link <a href="#problem" id="problem"></a>

* [x] [**HackerRank Problem Link**](https://www.hackerrank.com/challenges/js10-function/problem)

### Solution

* [x] **JS Solution**

{% code title="Func.js" %}

```javascript
function factorial(n) {
  return n ? n * factorial(n - 1) : 1;
}
```

{% endcode %}
