How to Check Internet Connection Exists or Not using Javascript?

99% of people used to type google.com immediately after opening their web browser to check internet connection. This is very true in our morden world. Now a days we can’t...