sqrt() and cbrt() methods in Javascript
sqrt() and cbrt() methods in Javascript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Test Page</title>
</head>
<body>
<script type="text/javascript">
var a = 64;
var b = 25;
var c = 5;
var d = 125;
var x = Math.sqrt(a);
var y = Math.sqrt(b);
var z = Math.sqrt(c);
var q = Math.sqrt(d);
var xx = Math.cbrt(a);
var yy = Math.cbrt(b);
var zz = Math.cbrt(c);
var qq = Math.cbrt(d);
console.log(x);
console.log(y);
console.log(z);
console.log(q);
console.log(xx);
console.log(yy);
console.log(zz);
console.log(qq);
</script>
</body>
</html>
Comments
Post a Comment
I WOULD APPRECIATE IF YOU LEAVE A COMMENT OR YOUR FEEDBACK HERE !!!