Not a member of GistPad yet?
Sign Up,
it unlocks many cool features!
- let a = 10;
- let b = 20;
- console.log("Before swapping: a =", a, "b =", b);
- [a, b] = [b, a]; // Swapping happens here
- console.log("After swapping: a =", a, "b =", b);
RAW Paste Data
Copied
