“Math.Faktorial” Code-Antworten

Faktor für Nummer js

const factorialize = num => {
  if (num === 0 || num === 1) {
    return 1;
  }
  for (let i = num - 1; i >= 1; i--) {
    num *= i;
  }
  return num;
};
codrzch

Faktorial JS

function factorial(n) {
  return (n + 1) * (n / 2);
}
someone else

Math.Faktorial

math.factorial(5)
Quaint Quetzal

Ähnliche Antworten wie “Math.Faktorial”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen