💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## 算数运算符 + - * / % 运算符 operator 5 + 6 表达式 组成 操作数和操作符,会有一定结果 | x = 5、y = 10 | 算数运算符 | 结果 | | --- | --- | --- | | x = 5、y = 10 | + | 15 | | x = 5、y = 10 | - | -5 | | x = 5、y = 10 | * | 50 | | x = 5、y = 10 | / | 0.5 | | x = 5、y = 10 | % | 5 | | x = 5、y = 0 | / | Infinity | | x = 5、y = 0 | % | NaN | 示例: ~~~ var x = 5; var y = 10; console.log(x + y); //:15 console.log(x - y); //:-5 console.log(x * y); //:50 console.log(x / y); //:0.5 console.log(x % y); //:5 console.log(x / 0); //:Infinity 无穷大 console.log(x % 0); //:NaN 非数值 ~~~ 效果: ![](https://img.kancloud.cn/4e/eb/4eeb3d9b6c8c1147198b1e34ed4c5a59_600x183.png)