Guest User

Untitled

a guest
Jun 20th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. const factorial = (n) => n ? n * factorial(n - 1) : 1;
  2. const userNum = prompt('Введите число для вычисления факториала');
  3. const parsed = parseInt(userNum);
  4. alert(factorial(userNum));
Add Comment
Please, Sign In to add comment