Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Assignment Operators
- Here, x = 10 and y = 5;
- = x = y
- > x = 5
- += x += y OR x = x + y
- > x = 15
- -= x -= y OR x = x - y
- > x = 5
- *= x *= y OR x = x * y
- > 50
- /= x /= y OR x = x / y
- > 2
- %= x %=y OR x = x % y
- > 0
- */
- // Assign value to a
- a = value;
- // Assign value to b if b is null;
- // otherwise, b stays the same
- b ??= value;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement