Batery Status

xxx

Battery level: xxx

Online Status

Online/Ofline xxx

Keybord


Sample code
function init() {
//complete the code below
plat.innerText = 'xxx';
navigator.geolocation
.getCurrentPosition(p =>
loc.innerText = 'xxx'
);
navigator.getBattery().then(b =>
lev.innerText = 'xxx'
);
check()
}
function check() {
//complete the code below
fetch(url.value).then(r =>
resp.innerText = r.ok? 'OK' : 'xxx'
).catch(e =>
resp.innerText = 'err'
)
}