Increment, Decrement and Bitwise
++ and -- add or subtract one, before or after use. Bitwise operators work on the binary form of integers: & | ^ ~ << >>.
Example
let i = 5;
console.log(i++, i, ++i);
console.log(5 & 3, 5 | 3, 5 ^ 3, 1 << 3, 16 >> 2);Exercise
Shift left by 3.
1 3
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.