Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Requirements:
- *
- * Write a function that accepts an integer and returns a “validation” number. This validation number is calculated by
- * adding all the digits in the input.
- *
- * If the result of this sum has more than a single digit, another iteration is required,
- * repeat the process until a single digit number is calculated.
- */
- function calculateValidationNumber(input) {}
- // calculateValidationNumber(444444); // Output: 6
Add Comment
Please, Sign In to add comment