Random() and Power() math Methods in Javascript
Random() and Power() math 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 = 1;
var b = 2;
var c = 5;
var d = 10;
var x = Math.random();
var y = Math.random();
var z = Math.random();
var q = Math.random();
var xx = Math.pow(a,b);
var yy = Math.pow(c,2);
var zz = Math.pow(c,5);
var qq = Math.pow(d,2);
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 !!!