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.
The description is just a movie reference. There are no clear directions. Have you read or tried this kata?
And why you say that? Any reasons?
Worst one Ive seen. Should be removed IMO.
Where are you when Im genuinely stumped? :-D
You just discovered closures.
Well, you wrote:
Which led me to conclusion that you need help with your solution. Apparently, you didn't.
My solution DOES work for the input he provided. My argument was (and still is) that (let me quote myself) 'This kata is very badly worded'. As far as Im concerned I did pass it. Youre arguing with me over something you agree with : 'I agree that it is somewhat weirdly explained...'. Why?
Look, I told you why your solution does not work. I agree that it is somewhat weirdly explained in the description of this kata, but this is how it is: your function must accept JavaScript
Date()
object as the argument, and not an arbitrary string representation of the date. If you want to solve this kata, you have to parse theDate()
object that your function received.Your solution must return the correct output for this:
No its not. his own example is
For example, new Date('06/14/2010') = 5
and nowhere in his description does he mention the requirement of using Date() object.
My solution returns the correct number given his input.
The input is a
Date()
object (https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date), not a string ofMM/DD/YYYY
format. This is probably the reason why your solution fails.This comment is hidden because it contains spoiler information about the solution