
Math.sqrt( ) 와 Math.pow( )에 대해서 알아보자 먼저 Math.sqrt( )로 루트값을 구할 수 있다. Math.sqrt(9); // 3Math.sqrt(25); // 5Math.sqrt(100); // 10Math.sqrt(2); // 1.414213562373095Math.sqrt(-1); // NaN 제곱값 구하는 방법 Math.pow( ) Math.pow(base, exponent) base 에는 제곱하고 싶은 숫자를 exponent 에는 base를 몇번 제곱할지 적으면 된다. // simpleMath.pow(7, 2); // 49Math.pow(7, 3); // 343Math.pow(2, 10); // 1024// fractional expone..