Created
May 24, 2020 19:04
-
-
Save baranovxyz/1c57fd9fe1889436d20ba0a247d25907 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function render() { | |
const filter = filterEl.value.trim(); | |
const filteredNotes = notes.filter(note => { | |
if (!filter) return true; | |
return note.title.includes(filter) || note.text.includes(filter); | |
}); | |
notesEl.innerHTML = filteredNotes.map(Note).join(""); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment