Skip to content

Instantly share code, notes, and snippets.

@msteckyefantis
Created April 2, 2018 07:47
Show Gist options
  • Save msteckyefantis/f20dbef07493a664ed9a8acd2f346957 to your computer and use it in GitHub Desktop.
Save msteckyefantis/f20dbef07493a664ed9a8acd2f346957 to your computer and use it in GitHub Desktop.
Swapping the Values of Two Variables
'use strict';
let a = 2; // a is now 2
let b = 3; // b is now 3
let c = a;
a = b;
b = c;
// a is now 3, and b is 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment