Skip to content

Instantly share code, notes, and snippets.

@jackfranklin
Created October 21, 2015 13:38
Show Gist options
  • Save jackfranklin/d0d7162c524aacbd285f to your computer and use it in GitHub Desktop.
Save jackfranklin/d0d7162c524aacbd285f to your computer and use it in GitHub Desktop.

Revisions

  1. jackfranklin created this gist Oct 21, 2015.
    12 changes: 12 additions & 0 deletions omg.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    function foo({ text, user: { screen_name: screenName }}) {
    console.log('text', text);
    console.log('name', screenName);
    }

    foo({
    text: 'hello world',
    user: { screen_name: 'Jack' },
    });

    // => text 'hello world'
    // => name 'Jack'