Created
March 6, 2017 03:08
-
-
Save Underdoge/6b88a66e797bd533ca1a7d46a9c37db7 to your computer and use it in GitHub Desktop.
evenDigitsOnly
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
function evenDigitsOnly(n) { | |
var nums=n.toString().split(""); | |
return nums.reduce((acc,currval,currindex,arr)=>{ | |
return acc&&currval%2==0 | |
},true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment