+ 3

How can I write this without using ".then"??

https://code.sololearn.com/Wn4th8gSSCQA/?ref=app

21st Mar 2018, 10:37 PM
Sina
Sina - avatar
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
23rd Mar 2018, 3:10 AM
raja
raja - avatar
+ 1
Thanks
23rd Mar 2018, 6:39 PM
Sina
Sina - avatar