foundersandcoders / coursebook

The new coursebook
https://learn.foundersandcoders.com
Other
49 stars 21 forks source link

[learn/typescript] #968

Open halimahexe opened 2 months ago

halimahexe commented 2 months ago

Under Task Removal the code snippet uses 'todos' instead of 'tasks' as a variable name.

function remove(id: number) {
  let index = todos.findIndex((t) => t.id === id);
  todos.splice(index, 1);
}

When the Birthday object is refactored, a new variable birthday is added but not defined.

date: new Date(birthday),

I think within createBirthday() the second arg should be birthday: string to make this work.