document. write("<h3>Methods</h3>");
var num=null;
document. write(Math.abs(num)+"<br>");
var num="Hello";
document. write(Math.abs(num)+"<br>");
var num=true;
document. write(Math.abs(num)+"<br>");
var num=null;
document. write(Math.abs(num)+"<--abs()<br>");
var num=5.4;
document. write(Math.ceil(num)+"<--ceil()<br>");
var num=7.8;
document. write(Math.floor(num)+"<--floor()<br>");
var num=2;
document. write(Math.exp(num)+"<--exp()<br>");
var num=1;
document. write(Math.log(num)+"<--log()<br>");
var num=90;
document. write(Math.min(-45,-6,3)+"<--min()<br>");
document. write(Math.max(-45,-6,3)+"<--max()<br>");
document. write(Math.pow(2,3)+"<--pow()<br>");
document. write(Math.random()+"<--random()<br>");
var num=4.5;
document. write(Math.round(num)+"<--round()<br>");
var num=64;
document. write(Math.sqrt(num)+"<--sqrt()<br>");
var num=216;
document. write(Math.cbrt(num)+"<--cbrt()<br>");
var num=3.678;
document. write(Math.trunc(num)+"<--trunc()<br>");
document. write(Math.sin(num)+"<--sin()<br>");
var num=90;
document. write(Math.cos(num)+"<--cos()<br>");
var num=45;
document. write(Math.tan(num)+"<--tan()<br>");
document. write("<h3>Properties</h3>");
document. write(Math.PI+"<--PI<br>");
document. write(Math.E+"<--E<br>");
document. write(Math.LN2+"<--LN2<br>");
document. write(Math.LN10+"<--LN10<br>");
document. write(Math.LOG2E+"<--LOG2E<br>");
document. write(Math.LOG10E+"<--LOG10E<br>");
Output
Comments
Post a Comment