switch values of two variables javascript code example Example: javascript swap two variables [a, b] = [b, a];