Create a reminder function, which adds the given reminder to the specific day the user wants, based on the message passed.
- All the input sentences will be in lowercase.
- Create a
Map
object with names of days as keys, and an array of reminder strings as values.
- Convert the
Map
object to an array, then return the output.
- Use the
extractReminderText()
given as an input to extract the reminder text from the message passed.
- Remove the day keyword from the message. (tomorrow, today, monday etc)
- Go through the test cases, to get an idea of expected keywords.
- The week starts on Sunday.
- Try out the question on Saturday, and make sure your solution works!
For example: