Skip to content

Instantly share code, notes, and snippets.

View gabrielperales's full-sized avatar
🏠
Working from home

Gabriel gabrielperales

🏠
Working from home
View GitHub Profile
{
"indent" : {
"value": " ",
"ArrayExpression": 1,
"AssignmentExpression": 1,
"BinaryExpression": 1,
"ConditionalExpression": 1,
"CallExpression": 1,
"CatchClause": 1,
"ConditionalExpression": 1,
@gabrielperales
gabrielperales / examples.md
Created November 23, 2015 10:22 — forked from addyosmani/examples.md
Object.observe() examples from my talk

What are we trying to observe? Raw object data.

// Objects
var obj = { id: 2 };
obj.id = 3; // obj == { id: 3 }
 
// Arrays
var arr = ['foo', 'bar'];
arr.splice(1, 1, 'baz'); // arr == ['foo', 'baz'];