Created
April 3, 2014 13:17
-
-
Save m1kc/9954144 to your computer and use it in GitHub Desktop.
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
// не моё | |
function plural_str(i, str1, str2, str3) { | |
if (i % 10 === 1 && i % 100 !== 11) return str1; | |
if (i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 10 || i % 100 >= 20)) return str2; | |
return str3; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment