Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
destructuring assignment example
// before
var displayAnnotation = config.displayAnnotation,
width = config.width,
axisHeight = config.axisHeight,
barsLeftMargin = config.barsLeftMargin,
barsRightMargin = config.barsRightMargin;
// after
var { displayAnnotation,
width,
axisHeight,
barsLeftMargin,
barsRightMargin } = config;
@einarj

This comment has been minimized.

Copy link

@einarj einarj commented Nov 15, 2014

Nice!

@paulirish

This comment has been minimized.

Copy link

@paulirish paulirish commented Nov 15, 2014

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment