EcmaScript 6 followup... destructuring example author:{fname}

4 views
Skip to first unread message

Pete Gordon

unread,
Apr 15, 2015, 8:29:46 PM4/15/15
to cbu...@googlegroups.com
Here's the example that we talked about for destructuring contract with nested object properties.....

function formattedTitle({title, author:{fname}}) {
  return title + ' by ' + fname
}


https://github.com/ahabra/codemash15-ecmascript6/blob/master/democode/p10_destructure.js

Reply all
Reply to author
Forward
0 new messages