x = 1;
y = 2;
obj1 = {x:x, y:y}; // ES5
obj2 = {x, y}; //ES6
console.log(obj1);
// Object {x: 1, y: 2}
console.log(obj2);
// Object {x: 1, y: 2}
Created
February 19, 2016 00:45
-
-
Save JuanCaicedo/0f7d44e0ca731930a55f to your computer and use it in GitHub Desktop.
ES 2015 Node Meetup OLS
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment