@@Mota
Moin was ist die Variable o ?
Schon das Aufkommen deiner Frage offenbart, was es ist: schlechter Stil.
Und entgegen dem anderswo im Thread erwähnten „kein guter Stil“ meine ich hier: richtig schlechter Stil.
Code sollte lesbar sein. Kryptische Variablenbezeichner sind das Gegenteil.
Wofür steht e
? Error? Event? Don’t make me think! Verwende sprechende Variablennamen! Und nein, nicht err
bzw. evt
, sondern error
bzw. event
.
Da diese ja in der if Abfrage als Vergleicher agiert.
Ja, der übergebene Parameter wird der Reihe nach mit allen Audioplayern verglichen. Vermutlich soll die Funktion mit sControl(event.target)
aufgerufen werden.
Unnötig zu erwähnen, dass deren Bezeichner sControl
genauso blöd ist wie o
.
🖖 Live long and prosper
--
“In my home, the America I love, the America I've written about, that has been a beacon of hope and liberty for 250 years, is currently in the hands of a corrupt, incompetent and treasonous administration. Tonight, we ask all who believe in democracy and the best of our American spirit, to rise with us, raise your voices against authoritarianism, and let freedom reign.”
— Bruce Springsteen, Manchester 2025-05-14
“In my home, the America I love, the America I've written about, that has been a beacon of hope and liberty for 250 years, is currently in the hands of a corrupt, incompetent and treasonous administration. Tonight, we ask all who believe in democracy and the best of our American spirit, to rise with us, raise your voices against authoritarianism, and let freedom reign.”
— Bruce Springsteen, Manchester 2025-05-14