get connected to internet javascript code example
Example: how to know connected internet in js
// example code
let Connected = window.navigator.onLine;
if (Connected) {
alert('Connection available');
} else {
alert('Connection not available');
}