두 식의 값을 나눈다.

 result=number1/number2
인수
result (결과값 변수)
임의의 숫자 변수이다.
number1, number2 (수식1, 2)
공식, 변수, 수치, 등을 포함하는 임의의 수식이다.
설명

두 수치 number1의 결과값을 number2의 결과값으로 나눈 결과값 수치를 반환한다.

특기

수치중에 하나라도 유효수치가 아니면 결과값은 NaN으로 반환한다.

number10이면 결과값 0을 반환하고, number20이면 결과값 Infinity을 반환한다.

number10이고 number20이면 결과값 NaN을 반환한다.

Infinity등 극한 상황의 계산 결과값은 한계 수치 속성 계산 예제을 참조하라.



operator
나누기(/) 연산자
나누기(/)</b> 연산자이전페이지로페이지 맨위로페이지 맨아래로

간단한 / 연산자 예제

5
3.1066746727980594
NaN
Infinity
0
NaN
<SCRIPT>
var a=100/20;
document.write(a); // 나눗셈이 됨
document.write('<BR>'); // 줄 바꿈
var s=a/Math.log(a); // 위 결과값을 log(결과값)으로 나눔
document.write(s);
document.write('<BR>');
var c=100/' 수치와 문자열의 결합'; // 유효수치가 아니면 NaN을 되돌려 줌
document.write(c);
document.write('<BR>');
document.write(12/0);
document.write('<BR>');
document.write(0/12);
document.write('<BR>');
document.write(0/0);
document.write('<BR>');
</SCRIPT>

operator
나누기(/) 연산자
견본
이전페이지로페이지 맨위로
최종 수정:
05/07/2025 14:14:27
KoXo Homepage
All right reserved
비정상적인 방식으로 프레임없이 페이지에 접속하면 자주 오류가 발생됩니다.
오류가 나면 정상적 접속으로 시도해 보세요.
http://koxo.com/lang/js/operator/divide.html