1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-04-05 13:15:53 +02:00
2025-03-11 16:55:08 +01:00

14 lines
299 B
JavaScript

// 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;
});