Courses
Log inStart Learning AI
Courses
Log inStart Learning AI
+ 1

Please how do I get the current battery level of a phone

JavaScript navigator.battery

<script></script>
11th Sep 2020, 1:09 AM
K_9ne
K_9ne - avatar
2 Answers
+ 2
https://code.sololearn.com/W0PYOfUHpBH4/?ref=app
11th Sep 2020, 1:12 AM
Divya Mohan
Divya Mohan - avatar
0
navigator.getBattery().then((battery)=>{ console.log(battery.level*100); })
11th Sep 2020, 1:16 AM
Divya Mohan
Divya Mohan - avatar

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
I have been learning code for about 2 months and I am still not good
1 Votes
Counter
0 Votes
How to make csharp program.cs, other Windows like the launch json and how to add other languages in the same code on ipad
0 Votes
How to learn coding faster
1 Votes
Can someone tell me how good this coding language is? You can look through the code to find syntax in a comment
1 Votes
“Algo salió mal” curso HTML text formating
0 Votes
what is markup language
0 Votes
What is a Mentor?
0 Votes
Why COUNT() doesn’t count NULL values in MySQL?
0 Votes
Django
0 Votes