加载中...

表达式的计算顺序


调试运行

<html>
<head>
<title>表达式的计算顺序</title>
</head>
<body>
<script language="javascript">
<!--
	a = 10;
	b = 5;
	c = 3;
	document.write('a=',a,',b=',b,',c=',c,'<br>');
	s = a + b * c;
	document.write('a + b * c = ',s,'<br>');
	s = (a + b) * c;
	document.write('(a + b) * c = ',s,'<br>');
//-->
</script>
</body>
</html>

还没有评论.