Skip to content

Conversation

@codebynina
Copy link
Owner

Hello,

Please review my Homework in javascript1 week4.

Thank you very much!

Copy link

@marcorichetta marcorichetta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job Niña!
Remember to format your code as it is a good practice. Prettier should get the work done.

Comment on lines +24 to +30
if (command.startsWith("Remove") && command.endsWith("from my todo")) {
let task = command.slice(7, -13). trim(); // Extract tasks from the command
let index = todos.indexOf(task);
if (index !== -1) {
todos.splice(index, 1);
return `Removed ${task} from your todo`;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty clever 💯

Comment on lines +37 to +39
if (command === "What day is it today?") {
return new Date ().toDateString();
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the homework, you should format your date as expected.
(Should respond with the date in a human readable format. E.g. if today is 30/8/2019 then it should respond with 30. of August 2019)

Hint: toLocaleDateString

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants