In this article, we will discuss how the current amount of zoom can be found on a webpage.
Note: The amount of zoom may not be exactly the amount of zoom shown by the browser. This can be solved by rounding off the value.
let zoom = (( window.outerWidth - 10 ) / window.innerWidth) * 100;
let zoom = body.clientWidth + "px x " + body.clientHeight + "px";
Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML course.