Checking the internet availability is easy in JavaScript. It will return a boolean true or false depending on the internet status. If the browser is connected to the internet, it will return the boolean true value and if not then it will return the boolean false value. It will simply alert message.