We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cde2cb9 commit 34f67b4Copy full SHA for 34f67b4
projects/note-app/index.js
@@ -1,10 +1,15 @@
1
const btnEl = document.getElementById("btn");
2
const appEl = document.getElementById("app");
3
4
-getNotes().forEach((note) => {
5
- const noteEl = createNoteEl(note.id, note.content);
6
- appEl.insertBefore(noteEl, btnEl);
7
-});
+const notas = getNotes();
+
+for (const note in notas) {
+ if (Object.hasOwnProperty.call(notas, note)) {
8
+ const element = notas[note];
9
+ const noteEl = createNoteEl(element.id, element.content);
10
+ appEl.insertBefore(noteEl, btnEl);
11
+ }
12
+}
13
14
function createNoteEl(id, content) {
15
const element = document.createElement("textarea");
0 commit comments