result = Math.pow(3,2) * Math.PI
と
with(Math) {
var result = pow(3,2) * PI
}
は、resultに同じ値が入る。
ヘッダ部分 なしボディ部分 <SCRIPT LANGUAGE="JavaScript"> var result1 = Math.pow(3,2) * Math.PI with(Math) { var result2 = pow(3,2) * PI } document.write("半径3cmの円の面積は" + result1 + "cm2"+ "です。<BR>") document.write("半径3cmの円の面積は" + result2 + "cm2"+ "です。<BR>") </SCRIPT>