14 lines
477 B
JavaScript
14 lines
477 B
JavaScript
'use strict'
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
const bombsSlider = document.getElementById('bombs');
|
|
const bombsValue = document.getElementById('bombsValue');
|
|
|
|
// Update the displayed number of bombs when the slider value changes
|
|
bombsSlider.addEventListener('input', () => {
|
|
bombsValue.textContent = bombsSlider.value;
|
|
});
|
|
|
|
// Initialize the displayed value on page load
|
|
bombsValue.textContent = bombsSlider.value;
|
|
});
|