mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
869 B
869 B
Doctor Strange
Instructions
You have been given the mission to create a new sense of time.
Instead of a normal week having only 7 days, you will have 14 days.
Your mission is to create an addWeek
function that can make this happen.
So now, a week is 14 days from Monday
to Sunday
then secondMonday
to secondSunday
.
Now imagine you have a doctor appointment and you have to wait some hours.
But you do not want to wait, so what you need to do is create a
function timeTravel
that allows you to change the time according to your needs, this function
it can go backwards or forwards in time.
You will have a function that takes a date and you will pass 3 more parameters to change
the hour, minute and seconds.
Example
timeTravel(date, hour, minute, second)
timeTravel(new Date('2020-05-29 23:25:22'), 21, 22, 22)
Output: '21:22:22'