1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-05 14:02:13 +02:00

🔤 intro

This commit is contained in:
2025-03-05 15:29:53 +01:00
parent 9ed6de2f8a
commit 8f0879196f
6 changed files with 247 additions and 119 deletions

View File

@ -0,0 +1,14 @@
// pseudocode
// Mixed concerns make code hard to maintain
const button = document.querySelector('button');
let count = 0;
button.addEventListener('click', () => {
count++;
document.querySelector('p').textContent =
'Clicked ' + count + ' times';
if (count > 10) {
button.disabled = true;
}
});