function logSwitchState(event) {
let el = event.target
console.log(`Switch is now ${el.value}`)
}
document.addEventListener("DOMContentLoaded", () => {
const buttons =
document.querySelectorAll('input[name="example_switch"]')
buttons.forEach((btn) => {
btn.addEventListener(
"input",
logSwitchState
)
})
})