Mubashir needs your help to find out trailing zeros after calculating factorial of a given number.
Create a function which takes a number n and calculates the number of trailing zeros in factorial of the given number.
n! = 1 * 2 * 3 * ... * n
trailingZeros(0) ➞ 0
// 0! = 1
// No trailing zero.
trailingZeros(6) ➞ 1
// 6! = 120
// 1 trailing zero.
trailingZeros(1000) ➞ 249
// 1000! has 249 trailing zeros.
Hint: No need to calculate the factorial (because it won't help). Find another way to find the number of zeros.