Initial commit
This commit is contained in:
5
.idea/.gitignore
generated
vendored
Normal file
5
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/rekru.iml" filepath="$PROJECT_DIR$/.idea/rekru.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
12
.idea/rekru.iml
generated
Normal file
12
.idea/rekru.iml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
3
Array/array.js
Normal file
3
Array/array.js
Normal file
@@ -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
|
||||
11
Asynchroniczność/asynchroniczność.js
Normal file
11
Asynchroniczność/asynchroniczność.js
Normal file
@@ -0,0 +1,11 @@
|
||||
console.log("Start");
|
||||
|
||||
setTimeout(() => {
|
||||
console.log("Timeout");
|
||||
}, 0);
|
||||
|
||||
Promise.resolve().then(() => {
|
||||
console.log("Promise");
|
||||
});
|
||||
|
||||
console.log("End");
|
||||
1
Dom/dom.js
Normal file
1
Dom/dom.js
Normal file
@@ -0,0 +1 @@
|
||||
//Zmiana tesktu w elemencie "<a href="tel:814714030">81 471 40 30</a>" na "123456789"
|
||||
6
Eventy/app.js
Normal file
6
Eventy/app.js
Normal file
@@ -0,0 +1,6 @@
|
||||
document.getElementById("parent").addEventListener("click", () => {
|
||||
console.log("Rodzic kliknięty");
|
||||
});
|
||||
document.getElementById("child").addEventListener("click", () => {
|
||||
console.log("Dziecko kliknięte");
|
||||
});
|
||||
20
Eventy/index.html
Normal file
20
Eventy/index.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="parent">
|
||||
<button id="child">Kliknij mnie</button>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById("parent").addEventListener("click", () => {
|
||||
console.log("Rodzic kliknięty");
|
||||
});
|
||||
document.getElementById("child").addEventListener("click", () => {
|
||||
console.log("Dziecko kliknięte");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
15
Function/function.js
Normal file
15
Function/function.js
Normal file
@@ -0,0 +1,15 @@
|
||||
a();
|
||||
b();
|
||||
c();
|
||||
|
||||
function a(){
|
||||
console.log("a")
|
||||
}
|
||||
|
||||
let b = ()=>{
|
||||
console.log("b");
|
||||
}
|
||||
|
||||
let c = function (){
|
||||
console.log("c");
|
||||
}
|
||||
13
Object/desctructing.js
Normal file
13
Object/desctructing.js
Normal file
@@ -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);
|
||||
22
Object/kopiowania.js
Normal file
22
Object/kopiowania.js
Normal file
@@ -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
|
||||
39
PointerEventsNone/pointerEventsNone.html
Normal file
39
PointerEventsNone/pointerEventsNone.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
.wrapper {
|
||||
position: relative;
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
button {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
z-index: 2;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="wrapper">
|
||||
<button onclick="alert('Kliknięto przycisk!')">Kliknij mnie</button>
|
||||
<div class="overlay">x</div>
|
||||
</div>
|
||||
|
||||
<!--wiemy, że pointer-events: none; blokuje kliknięcie w .overlay, ale pytanie czy przycisk zostanie kliknięty?-->
|
||||
</body>
|
||||
</html>
|
||||
16
Promise/promise.js
Normal file
16
Promise/promise.js
Normal file
@@ -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
|
||||
6
ShortCircuiting/shortCircuiting.js
Normal file
6
ShortCircuiting/shortCircuiting.js
Normal file
@@ -0,0 +1,6 @@
|
||||
const x = false || 12;
|
||||
const y = 5 && "text";
|
||||
const z = 0 ?? {};
|
||||
|
||||
|
||||
console.log(x,y,z);
|
||||
3
Typeof/typeOf.js
Normal file
3
Typeof/typeOf.js
Normal file
@@ -0,0 +1,3 @@
|
||||
console.log(typeof(null));
|
||||
console.log(typeof(17));
|
||||
console.log(typeof([]));
|
||||
6
TypyDanych/typyDanych.js
Normal file
6
TypyDanych/typyDanych.js
Normal file
@@ -0,0 +1,6 @@
|
||||
let a = {name: "Arek"};
|
||||
let b = a;
|
||||
b.name = "Paweł";
|
||||
|
||||
console.log(a.name);
|
||||
console.log(b.name);
|
||||
12
VarLetConst/varLetConst.js
Normal file
12
VarLetConst/varLetConst.js
Normal file
@@ -0,0 +1,12 @@
|
||||
b = 12;
|
||||
|
||||
console.log(b);
|
||||
|
||||
var b;
|
||||
|
||||
//Let
|
||||
c = 12;
|
||||
|
||||
console.log(c);
|
||||
|
||||
let c;
|
||||
Reference in New Issue
Block a user