From 151c62dd469bc0a722f2c0a0a7b881d4420fc89d Mon Sep 17 00:00:00 2001 From: Krystyna Date: Wed, 23 Jul 2025 09:31:23 +0200 Subject: [PATCH] Initial commit --- .idea/.gitignore | 5 +++ .idea/modules.xml | 8 +++++ .idea/rekru.iml | 12 ++++++++ .idea/vcs.xml | 6 ++++ Array/array.js | 3 ++ Asynchroniczność/asynchroniczność.js | 11 +++++++ Dom/dom.js | 1 + Eventy/app.js | 6 ++++ Eventy/index.html | 20 ++++++++++++ Function/function.js | 15 +++++++++ Object/desctructing.js | 13 ++++++++ Object/kopiowania.js | 22 +++++++++++++ PointerEventsNone/pointerEventsNone.html | 39 ++++++++++++++++++++++++ Promise/promise.js | 16 ++++++++++ ShortCircuiting/shortCircuiting.js | 6 ++++ Typeof/typeOf.js | 3 ++ TypyDanych/typyDanych.js | 6 ++++ VarLetConst/varLetConst.js | 12 ++++++++ 18 files changed, 204 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/modules.xml create mode 100644 .idea/rekru.iml create mode 100644 .idea/vcs.xml create mode 100644 Array/array.js create mode 100644 Asynchroniczność/asynchroniczność.js create mode 100644 Dom/dom.js create mode 100644 Eventy/app.js create mode 100644 Eventy/index.html create mode 100644 Function/function.js create mode 100644 Object/desctructing.js create mode 100644 Object/kopiowania.js create mode 100644 PointerEventsNone/pointerEventsNone.html create mode 100644 Promise/promise.js create mode 100644 ShortCircuiting/shortCircuiting.js create mode 100644 Typeof/typeOf.js create mode 100644 TypyDanych/typyDanych.js create mode 100644 VarLetConst/varLetConst.js diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..99139b9 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/rekru.iml b/.idea/rekru.iml new file mode 100644 index 0000000..0c8867d --- /dev/null +++ b/.idea/rekru.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Array/array.js b/Array/array.js new file mode 100644 index 0000000..813fa0e --- /dev/null +++ b/Array/array.js @@ -0,0 +1,3 @@ +const data = "Ania-25-Warszawa,Kamil-32-Kraków,Paweł-17-Gdańsk,Monika-28-Wrocław,Tomek-19-Poznań"; + +//Wydobadz wszystkie imiona \ No newline at end of file diff --git a/Asynchroniczność/asynchroniczność.js b/Asynchroniczność/asynchroniczność.js new file mode 100644 index 0000000..2fca22d --- /dev/null +++ b/Asynchroniczność/asynchroniczność.js @@ -0,0 +1,11 @@ +console.log("Start"); + +setTimeout(() => { + console.log("Timeout"); +}, 0); + +Promise.resolve().then(() => { + console.log("Promise"); +}); + +console.log("End"); diff --git a/Dom/dom.js b/Dom/dom.js new file mode 100644 index 0000000..f34131d --- /dev/null +++ b/Dom/dom.js @@ -0,0 +1 @@ +//Zmiana tesktu w elemencie "81 471 40 30" na "123456789" \ No newline at end of file diff --git a/Eventy/app.js b/Eventy/app.js new file mode 100644 index 0000000..651e572 --- /dev/null +++ b/Eventy/app.js @@ -0,0 +1,6 @@ +document.getElementById("parent").addEventListener("click", () => { + console.log("Rodzic kliknięty"); +}); +document.getElementById("child").addEventListener("click", () => { + console.log("Dziecko kliknięte"); +}); diff --git a/Eventy/index.html b/Eventy/index.html new file mode 100644 index 0000000..27c7855 --- /dev/null +++ b/Eventy/index.html @@ -0,0 +1,20 @@ + + + + + Title + + +
+ +
+ + + \ No newline at end of file diff --git a/Function/function.js b/Function/function.js new file mode 100644 index 0000000..f68f167 --- /dev/null +++ b/Function/function.js @@ -0,0 +1,15 @@ +a(); +b(); +c(); + +function a(){ + console.log("a") +} + +let b = ()=>{ + console.log("b"); +} + +let c = function (){ + console.log("c"); +} \ No newline at end of file diff --git a/Object/desctructing.js b/Object/desctructing.js new file mode 100644 index 0000000..ff35727 --- /dev/null +++ b/Object/desctructing.js @@ -0,0 +1,13 @@ +const user = { + name: "Tomek", + settings: { + theme: "light", + notifications: true + } +}; + +const { name, settings } = user; +settings.theme = "dark"; + +console.log(user.settings.theme); +console.log(settings.theme); \ No newline at end of file diff --git a/Object/kopiowania.js b/Object/kopiowania.js new file mode 100644 index 0000000..dc683f1 --- /dev/null +++ b/Object/kopiowania.js @@ -0,0 +1,22 @@ +const person1 = { + name: "Ola", + age: 20, + nested: { + city: "Poznań" + } +}; + +const person2 = { ...person1}; +person2.name = "Ela"; +person2.nested.city = "Kraków"; + +console.log(person1.name); +console.log(person1.nested.city); + +const age = 12; +const { age: personAge} = person1; + +console.log(age); + + +//Dlczego tak jest? Co trzeba zrobić żeby przekopiować całość. Jak zrobić dest \ No newline at end of file diff --git a/PointerEventsNone/pointerEventsNone.html b/PointerEventsNone/pointerEventsNone.html new file mode 100644 index 0000000..8d8a9a3 --- /dev/null +++ b/PointerEventsNone/pointerEventsNone.html @@ -0,0 +1,39 @@ + + + + + Title + + + + +
+ +
x
+
+ + + + \ No newline at end of file diff --git a/Promise/promise.js b/Promise/promise.js new file mode 100644 index 0000000..d39c630 --- /dev/null +++ b/Promise/promise.js @@ -0,0 +1,16 @@ +function getMessage() { + return new Promise((resolve) => { + setTimeout(() => { + resolve("Wiadomość odebrana!"); + }, 1000); + }); +} + +async function showMessage() { + const msg = getMessage(); + console.log(msg); +} + +showMessage(); + +//Co zwróci console.log, Czego brakuje w tym kodzie \ No newline at end of file diff --git a/ShortCircuiting/shortCircuiting.js b/ShortCircuiting/shortCircuiting.js new file mode 100644 index 0000000..3caab31 --- /dev/null +++ b/ShortCircuiting/shortCircuiting.js @@ -0,0 +1,6 @@ +const x = false || 12; +const y = 5 && "text"; +const z = 0 ?? {}; + + +console.log(x,y,z); diff --git a/Typeof/typeOf.js b/Typeof/typeOf.js new file mode 100644 index 0000000..cb3e274 --- /dev/null +++ b/Typeof/typeOf.js @@ -0,0 +1,3 @@ +console.log(typeof(null)); +console.log(typeof(17)); +console.log(typeof([])); \ No newline at end of file diff --git a/TypyDanych/typyDanych.js b/TypyDanych/typyDanych.js new file mode 100644 index 0000000..87f7182 --- /dev/null +++ b/TypyDanych/typyDanych.js @@ -0,0 +1,6 @@ +let a = {name: "Arek"}; +let b = a; +b.name = "Paweł"; + +console.log(a.name); +console.log(b.name); \ No newline at end of file diff --git a/VarLetConst/varLetConst.js b/VarLetConst/varLetConst.js new file mode 100644 index 0000000..cc6e0fd --- /dev/null +++ b/VarLetConst/varLetConst.js @@ -0,0 +1,12 @@ +b = 12; + +console.log(b); + +var b; + +//Let +c = 12; + +console.log(c); + +let c; \ No newline at end of file