Skip to content

Instantly share code, notes, and snippets.

@tfogo
Last active January 23, 2017 21:01
Show Gist options
  • Select an option

  • Save tfogo/c6aa1a8ca38b5f41d729dc608522afa7 to your computer and use it in GitHub Desktop.

Select an option

Save tfogo/c6aa1a8ca38b5f41d729dc608522afa7 to your computer and use it in GitHub Desktop.
Finding prime number phone numbers
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