In this challenge, you have to verify if a number is exactly divisible by a combination of its digits. There are three possible conditions to test:
Given an integer n, implement a function that returns:
"Perfect".1 or 2)."Indivisible".digitalDivision(21) ➞ 1
// Exactly divisible only by the sum of its digits (2 + 1 = 3).
digitalDivision(128) ➞ 2
// Exactly divisible by each of its digits.
// Exactly divisible by the product of its digits (1 * 2 * 8 = 16).
digitalDivision(100) ➞ 2
// Exactly divisible by each of its digits (excluding zeros).
// Exactly divisible by the sum of its digits (1 + 0 + 0 = 1).
digitalDivision(12) ➞ "Perfect"
// Exactly divisible by each of its digits.
// Exactly divisible by 3 (sum of digits = 1 + 2).
// Exactly divisible by 2 (product of digits = 1 * 2).
digitalDivision(31) ➞ "Indivisible"
// Every testing condition is false.
n is divisible by each of its digits (see example #3).