3 Ways You May Don’t Know About Swap Two Numeric Variable Without a Temporary Variable
An interesting topic with little practical value.
When we first learned programming, you must have written code that swapped the values of two variables. Now you can certainly accomplish this task very easily.
let a = 5
let b = 4
let tmp = a
a = b
b = tmp