Repository navigation
Conversation
sarlam
left a comment
There was a problem hiding this comment.
This is really readable and easy to review, nice work here
I made an optional comment which you do not have to address
What needs to be done: Week4 cleanup is missing
Let me know if you need any help
| console.log(isBookApplicable("JavaScript")); // true | ||
| console.log(isBookApplicable("javascript")); // true | ||
| console.log(isBookApplicable("Python")); // false | ||
| console.log(isBookApplicable(" JavaScript ")); // true | ||
| console.log(isBookApplicable("HTML")); // false No newline at end of file |
There was a problem hiding this comment.
Really cool to have added different and more challenging test examples than what was listed in the instructions
| day: second, | ||
| year: third | ||
| }; | ||
| } else { |
There was a problem hiding this comment.
while it technically works and for this specific example it does what is required from it, this would need to be refactored for this code to be easier to maintain in the future
Imagine, tomorrow we introduce a new format DT which is now 21101983-2035 (date-time) then it would silently say it is working returning day: 21101983 and month: 2035 and year: undefined
We most likely want something more robust that actually look into the declared format and return undefined or null otherwise so if we introduce new formats later it does not breaks
No description provided.