suma cyfr cyfr danej liczby
<script>
// JavaScript program to compute
// product of digits in the number.
// Function to get product of digits
function getProduct(n)
{
let product = 1;
while (n != 0)
{
product = product * (n % 10);
n = Math.floor(n / 10);
}
return product;
}
// Driver code
let n = 4513;
document.write(getProduct(n));
// This code is contributed by Manoj.
</script>
Manpreet Kaur