+ 3
How can I write this without using ".then"??
2 Answers
+ 1
battery = navigator.getBattery();
var start = async function test(){
var result = await battery;
document.write('Battery level :', result.level*100)
}
start();
https://code.sololearn.com/W8y641zFFf2Z#js
+ 1
Thanks