Antwort
ein anderes Schulfach
Informatik weil ich bin Hobby Programmierer.
Informatik weil ich bin Hobby Programmierer.
const button1 = document.querySelector('.button1');
const resArea = document.querySelector('#resultArea');
// Beliebige Funktionen erstellen
function play() { // ... };
function plus() { // ... };
// Beliebige Funktionen gruppieren
function btnPlayPlus() {
play();
plus();
};
// Funktion(en) mit einem Click-Event zuweisen
button1.addEventListener('click', btnPlayPlus);