Please login to start chat

ICT Solutions 22 Jun 2022, 09:45:52
Category : JavaScript Tutorials

Math.pow() (JS Math)

<!DOCTYPE html>
<html>
<head>
<title>JavaScript Code Testing</title>
</head>
<body>
<p id = "demo">This is JavaScript Math.pow Testing</p>
<button type = "button" onclick = "jsPower()">Math Power</button>

<script>
var a = 9;
var b = 5;
document.getElementById("demo").innerHTML = a + " and " + b;

function jsPower(){
var c = Math.pow(a, b);
document.getElementById("demo").innerHTML = c;
}

</script>
</body>
</html>

Comments:

No comment to show.

Available Services
Download Android Application