What if I want to store a very very large number and then display it. For example factorial of 200.

**How can I do this using JavaScript?**

I tried the normal way and the result is null or infinity. 

```js
function fact(input) {
    if(input == 0) {
        return 1;
        }
    return input * fact(input-1);
}
var result = fact(171);
console.log(result);
```

[![enter image description here](https://i.stack.imgur.com/hYOj6.jpg)](https://i.stack.imgur.com/hYOj6.jpg)

I tried in normal way and the result is infinity or null.
It seems JavaScript can generate Factorial up to 170.

[![enter image description here](https://i.stack.imgur.com/9kekQ.jpg)](https://i.stack.imgur.com/9kekQ.jpg)

Look at this picture. This calculator seems able to do it.