ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# Advanced Operators Some advanced operators can be used, such as: - **Modulus (division remainder)**: `x = y % 2` - **Increment**: Given a = 5 - `c = a++`, Results: c = 5 and a = 6 - `c = ++a`, Results: c = 6 and a = 6 - **Decrement**: Given a = 5 - `c = a--`, Results: c = 5 and a = 4 - `c = --a`, Results: c = 4 and a = 4 Exercise Define a variable `c` as the modulus of the decremented value of `x` by 3. ~~~ var x = 10; var c = ~~~