Computer Science, asked by gtaben3328, 1 year ago

How to increase value without using arithmetic variables and extra variables in javascript

Answers

Answered by lopr1998
0

This equation swaps two numbers without a temporary variable, but uses arithmetic operations:


a = (a+b) - (b=a);

How can I do it without arithmetic operations? I was thinking about XOR.

Similar questions