Skip to content

Instantly share code, notes, and snippets.

@domderen
Created May 11, 2015 10:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save domderen/104768214edeeb9df590 to your computer and use it in GitHub Desktop.
Save domderen/104768214edeeb9df590 to your computer and use it in GitHub Desktop.
function getValues () {
return {
a: 1,
b: 2
};
}
let {a, b} = getValues();
console.log(a, b);
function getValues () {
return {
a: 1,
b: 2
};
}
let a, b;
{a, b} = getValues();
console.log(a, b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment