samfrancisco

Software Engineering Coding Challenge 4 (Javascript)

Nov 26th, 2019
723
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Requirements:
  3.  *
  4.  * Write a function that accepts an integer and returns a “validation” number. This validation number is calculated by
  5.  * adding all the digits in the input.
  6.  *
  7.  * If the result of this sum has more than a single digit, another iteration is required,
  8.  * repeat the process until a single digit number is calculated.
  9.  */
  10.  
  11. function calculateValidationNumber(input) {}
  12.  
  13. // calculateValidationNumber(444444); // Output: 6
Add Comment
Please, Sign In to add comment