function getStatus() {
const statusDisplay = document.getElementById("status");
statusDisplay.textContent = navigator.onLine ? "Online" : "OFFline";
if (statusDisplay.textContent === "Online") {
console.log('Online');
} else if (statusDisplay.textContent === "OFFline"){
console.log('Offline');
}
}
setInterval(getStatus, 2000);