diff --git a/01/app.js b/01/app.js
index 1c9992e..e27f60d 100644
--- a/01/app.js
+++ b/01/app.js
@@ -1 +1,8 @@
-console.log('DOM');
\ No newline at end of file
+console.log('DOM');
+const commentsItem = document.querySelector(".comments__item");
+const newWest = document.querySelector(".comments__item--newest");
+
+if (commentsItem && newWest) {
+ const dataInfo = document.querySelectorAll("[data-info]")
+ console.log(`Znaleziono ${dataInfo.length}`)
+};
diff --git a/02/app.js b/02/app.js
index 1c9992e..4235183 100644
--- a/02/app.js
+++ b/02/app.js
@@ -1 +1,7 @@
-console.log('DOM');
\ No newline at end of file
+console.log('DOM');
+
+const links = document.querySelectorAll("[data-url]");
+links.forEach(link => {
+ const url = link.getAttribute("data-url");
+ link.href = url;
+});
\ No newline at end of file
diff --git a/02/index.html b/02/index.html
index 89a53f6..a397da7 100644
--- a/02/index.html
+++ b/02/index.html
@@ -11,7 +11,7 @@
Moje ulubione strony:
diff --git a/03/app.js b/03/app.js
index c299ca3..de81dca 100644
--- a/03/app.js
+++ b/03/app.js
@@ -11,4 +11,17 @@ const buttonSettings = {
color: '#444'
},
text: 'Click me!',
-}
\ No newline at end of file
+};
+
+const button = document.createElement("button");
+for (const key in buttonSettings) {
+ button.setAttribute(key, buttonSettings.attr[key]);
+};
+
+for (const style in buttonSettings.css) {
+ button.style[style] = buttonSettings[style];
+};
+
+button.textContent = buttonSettings.text;
+const parentElement = document.querySelector(".parent-for-button");
+parentElement.appendChild(button);
\ No newline at end of file
diff --git a/04/app.js b/04/app.js
index e6411e4..3353f61 100644
--- a/04/app.js
+++ b/04/app.js
@@ -2,7 +2,53 @@ console.log('DOM');
// struktura do wykorzystania w pętli
const menuItems = [
- {text: 'start', url: '/'},
- {text: 'galeria', url: '/gallery'},
- {text: 'kontakt', url: '/contact'},
-];
\ No newline at end of file
+ { text: 'start', url: '/' },
+ { text: 'galeria', url: '/gallery' },
+ { text: 'kontakt', url: '/contact' },
+];
+
+const nav = document.querySelector("nav");
+const ul = document.querySelector("ul");
+
+nav.innerHTML = `
+
+`
+menuItems.forEach(link => {
+ const ul = document.querySelector("ul");
+ const li = document.createElement("li");
+ const a = document.createElement("a");
+ a.href = link.url;
+ a.textContent = link.text;
+ li.appendChild(a);
+ ul.appendChild(li);
+});
+
+nav.appendChild(ul);
+
+// Utwórz poniższą strukturę menu za pomocą JS:
+
+// ```
+//
+// ```
+
+// Całość wstaw do elementu ``.
+
+// Początkowo spróbuj wykonać to zadanie bez wykorzystania poniższej struktury:
+
+// ```
+// const menuItems = [
+// {text: 'start', url: '/'},
+// {text: 'galeria', url: '/gallery'},
+// {text: 'kontakt', url: '/contact'},
+// ]
+// ```
+
+// Następnie zrób to samo, ale używając danych wraz z np. [forEach](https://developer.mozilla.org/pl/docs/Web/JavaScript/Referencje/Obiekty/Array/forEach).
\ No newline at end of file
diff --git a/05/app.js b/05/app.js
index 39abe5d..93ebbfa 100644
--- a/05/app.js
+++ b/05/app.js
@@ -1,3 +1,34 @@
console.log('DOM');
const curr = document.querySelector('.js-curr');
+console.log(curr);
+
+const newButton = document.createElement("button");
+newButton.innerText = "usuń koszyk";
+curr.parentNode.appendChild(newButton);
+
+const siblings = Array.from(curr.parentNode.children);
+siblings.forEach(sibling => {
+ if (sibling !== curr) {
+ sibling.classList.add("siblings");
+ };
+});
+
+const nextArticle = curr.parentNode.nextElementSibling;
+if (nextArticle && nextArticle.classList.contains("article")) {
+ nextArticle.setAttribute("title", "nextElementSibling");
+}
+
+const lastArticle = document.querySelector("article:last-of-type");
+const newParagraph = document.createElement("p");
+newParagraph.textContent = "To jest nowy paragraf";
+const buttonInLastArticle = lastArticle.querySelector("button");
+lastArticle.insertBefore(newParagraph, buttonInLastArticle);
+
+const articlesParent = document.querySelector("article").parentNode;
+const newArticle = document.createElement('article');
+const newArticleContent = document.createElement("p");
+newArticleContent.textContent = "Nowy artykuł na początku listy";
+newArticle.appendChild(newArticleContent);
+
+articlesParent.insertBefore(newArticle, articlesParent.firstElementChild);
\ No newline at end of file