MCPcopy Create free account
hub / github.com/codemistic/Web-Development / deleteNote

Function deleteNote

AryaNotes/app.js:99–109  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

97
98// Function to delete a note
99function deleteNote(index) {
100 let notes = localStorage.getItem("notes");
101 if (notes == null) {
102 notesObj = [];
103 } else {
104 notesObj = JSON.parse(notes);
105 }
106 notesObj.splice(index, 1);//to remove a note from array
107 localStorage.setItem("notes", JSON.stringify(notesObj));
108 showNotes();
109}
110
111//searching for notes
112let search = document.getElementById('searchTxt');

Callers

nothing calls this directly

Calls 2

showNotesFunction · 0.85
parseMethod · 0.80

Tested by

no test coverage detected