Open this example in the interactive library
Source code
let primary = "light",
secondary = "dark";
[primary, secondary] = [secondary, primary];
console.log(primary, secondary);
Sample output
dark light

Open this example in the interactive library
let primary = "light",
secondary = "dark";
[primary, secondary] = [secondary, primary];
console.log(primary, secondary);
dark light