HTML文件,建议用Visual Studio Code或者HBuilder X打开查看
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>赋值运算符</title>
<script>
//=,+=,-=,/=,*/,%=
var num1=1,num2=21;
num1+=2;//num1=num1+2,其他符号也适用。
console.log(num2%2);// 5
</script>
</head>
<body>
</body>
</html>