Skip to content

Instantly share code, notes, and snippets.

Created December 10, 2014 19:39
What would you like to do?
Object JavaScript ECMAScript 6 block scope sample
function order(x, y) {
if (x > y)
let tmp = x;
x = y;
y = tmp;
console.log (tmp === x)
// reference error: tmp not defined
return [ x, y];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment