Struggling to identify the issue, yet encountering the same persistent error! The problem persists even when alternative methods such as includes are attempted.
let notes = [{},{
title: 'My upcoming journey',
body: 'I am planning a trip to Spain'
},{
title: 'Daily routines to improve',
body: 'Exercise and eat healthier'
},{
title: 'Revamping the workspace',
body: 'Considering getting a new desk chair'
}]
let filteredNotes = notes.filter( function (note, index) {
let findFilteredTitle = note.title.toLowerCase().includes('ne')
let findFilteredBody = note.body.toLowerCase().includes('ne')
return findFilteredTitle || findFilteredBody
})
console.log(filteredNotes)