Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Please provide more detailed description of the task and some example test cases as well.
Thanks :-)
See here: http://jsfiddle.net/J3Spt/
Maybe it's not much shorter, but at least it's algoritmic :-)
If year is e.g. 2000 (non-leap), this solution will return incorrect result - true, I think :(
@ca6age:
var handled = ending.replace(/[.+]/g, '\$&');
return new RegExp(handled + "$", "i").test(str);
:-) You could replace your function num with:
num_code_of_x = x.toLowerCase().charCodeAt(0);
Same here :(
Please provide Test object (or info that it's present) for user's own test cases
Will not work for test cases where number < 0, I think.
What is purpose of "~~" in this case?
Wow, really elegant solution :)