Last active
January 23, 2017 21:01
-
-
Save tfogo/c6aa1a8ca38b5f41d729dc608522afa7 to your computer and use it in GitHub Desktop.
Finding prime number phone numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| twilioPromise.then(twilioObject => { | |
| let verifiedPrimes = []; | |
| twilioObject.available_phone_numbers.forEach(e => { | |
| if (primality(e.phone_number.slice(2)) && !verifiedPrimes.includes(e.phone_number.slice(2))) { | |
| verifiedPrimes.push(e.phone_number.slice(2)); | |
| } | |
| }); | |
| console.log(verifiedPrimes); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment