-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
42 lines (38 loc) · 1.15 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const p = document.getElementById("p");
const pp = document.getElementById("pp");
let size = 40;
p.onclick = () => {
size += 10;
pp.style.fontSize = `${size}px`;
if (size > 80) {
pp.style.textShadow = "0 0 20px #fff454";
}
};
const cislo1 = document.getElementById("cislo1");
const cislo2 = document.getElementById("cislo2");
const enter = document.getElementById("enter");
const vysledek = document.getElementById("vysledek");
const vpenisech = document.getElementById("vpenisech");
const owo = document.getElementById("OwO");
enter.onclick = () => {
const soucet = Number(cislo1.value || 0) + Number(cislo2.value || 0);
vysledek.innerHTML = `${cislo1.value || 0} a ${cislo2.value || 0} je ${soucet}`;
if (soucet < 6) owo.style.display = "none";
if (soucet > 5) owo.style.display = "block";
if (soucet === 0) {
vpenisech.innerHTML = "Žádné penisy 😢";
return;
}
let nazorne = "";
let i = 0;
while (i < Number(soucet)) {
nazorne += "╰⋃╯ ";
i += 1;
}
/*
for (let i = 0; i < Number(soucet); x++) {
nazorne += "╰⋃╯ ";
}
*/
vpenisech.innerHTML = `Nebo názorně v penisech: <br>${nazorne}`;
};