2 ms·
Swap was not the best choice to be used as example, imho. CoffeScript has deconstructing assignments so to swap two variables you just do [x, y] = [y, x].
by rimantas 15y ago
Swap was not the best choice to be used as example, imho.
CoffeScript has deconstructing assignments so to swap two variables you just do [x, y] = [y, x].