The connection object gives access to the device's cellular and wifi connection information.
connection
This object is accessed under the navigator.network interface.