Today I Learned

hashrocket A Hashrocket project

Use object spread operator to get remaining values

const props = { width: 10, height: 10, color: 'red' }
const { width, ...rest } = props

// width => 10
// rest => { height: 10, color: 'red' }
See More #javascript TILs
Looking for help? At Hashrocket, our JavaScript experts launch scalable, performant apps on the Web, Android and iOS. Contact us and find out how we can help you.