Created
August 18, 2014 02:02
-
-
Save Alex1990/943f6578a744ca6d44d1 to your computer and use it in GitHub Desktop.
check if the digit of the number is expected
This file contains 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
// when you need a range, you'd better use comparison operators | |
function isFullYear(year) { | |
return !/^\d{4}$/.test(year); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment