// Loading animatsiyasini yo'q qilish
const loaderWrapper = document.querySelector('.loader-wrapper');
setTimeout(() => {
loaderWrapper.style.display = 'none';
}, 1500);
// Timer
const deadLine = '2025-02-21';
function getTimeRemaining(endtime) {
const time = Date.parse(endtime) - Date.parse(new Date()),
days = Math.floor(time / (1000 * 60 * 60 * 24)),
hours = Math.floor((time / (1000 * 60 * 60)) % 24),
minutes = Math.floor((time / (1000 * 60)) % 60),
seconds = Math.floor((time / 1000) % 60);
return { total: time, days, hours, minutes, seconds };
}
// Funksiyani chaqiramiz va natijani ko'ramiz
console.log(getTimeRemaining(deadLine));
const box = document.querySelector('.box')
btn = document.querySelector('button')
btn.addEventListener('click', () => {
console.log(box.scrollTop);
})function Person(first, last, age, eyecolor) {
this.firstName = first;
this.lastName = last;
this.age = age;
this.eyeColor = eyecolor;
}
const myFather = new Person("John", "Doe", 50, "blue");
const myMother = new Person("Sally", "Rally", 48, "green");
coding with ☕️
console.log(box.getBoundingClientRect());
style list prototypes