Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const todos = [
- {
- text: 'Order cat food',
- completed: true
- },
- {
- text: 'Clean kitchen',
- completed: false
- },
- {
- text: 'Buy food',
- completed: true
- },
- {
- text: 'Do work',
- completed: false
- },
- {
- text: 'Exercise',
- completed: true
- }
- ];
- const showPendingNotes = function(notes) {
- return notes.filter(function(note, index) {
- if(note.completed === false) {
- return note.text
- }
- })
- };
- console.log(showPendingNotes(todos));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement