这样可以不

来源:5-8 编程练习

墨上风

2017-10-25 03:54:24

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title> ++和--的运算</title>
</head>
<body>
    <script>
var x1=4,x2=5,
            x1=x1++, x2=--x2,
   a3=(x1)+(x2),
   a4=(x1)-(x2),
   a5=(x1)*(x2),
   a6=(x1)/(x2),
   a7=(x1)%(x2);
   
console.log("(x1++)+(--x2)="+a3);
console.log("(x1++)-(--x2)="+a4);
console.log("(x1++)*(--x2)="+a5);
console.log("(x1++)/(--x2)="+a6);
console.log("(x1++)%(--x2)="+a7);
</script>
</body>
</html>

老师看一看

写回答

1回答

怎么都被占用了呢

2017-10-25

这样可以的,继续加油吧~~

0

0 学习 · 36712 问题

查看课程