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.
Not the most concise option (like those nifty regexes), but certainly best practice for both readability and performance. Good job!
good point!
I'm not keen on the hard coding for 'e', I know it's for the single case where scientific notation is used, but I used a regexp there to say that if any non digit, period, comma, or space is included in the string it should fail (This then holds for the cases where N, E, W, S are erroneously included, even though they are also handled by ParsFloat)
Your solution looks identical to mine! Great minds and all... Well done Shamus03 ;-)
I never thought of using
reduce
like this. Nice way to do purely-functional reduction in JS!Beautiful!