Dobry wieczór. Dopiero zaczął naukę JavaScript i mam problem Robię przykład według tutoriali i kursów tam nie ma błędu a u mnie jest identycznie i pierwszej linijce wyskakuje błąd: 'updateClock' is defined but never used.
Moglibyście pomóc mi to naprawić, bez Waszej pomocy nie ruszę z miejsca nawet. Z góry bardzo dziękuję.
function updateClock() { "use strict";
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
if (hours < 10) {
hours = "0" + hours;
}
if (minutes < 10) {
minutes = "0" + minutes;
}
if (seconds < 10) {
seconds = "0" + seconds;
}
var elem = document.getElementById('clock');
elem.innerHTML = hours + ':' + minutes + ':' + seconds;
}