Vetrichelvan Jeyapalpandy

12 years of experience in web development. Javascript enthusiast. Performance is an important trait of any website, so trying to improve that wherever possible.


ES6 - Spread Operator

var state = {'veg': 'potato'} //All Same state = $.extend({}, state, {'fruit': 'apple'}) // jQuery state = Object.assign({}, state, {'fruit': 'apple'}) // JS state = { ...state, 'fruit': 'apple'} //ES6 Spread operator Notice the above code it does the same thing. Spread operator is an easy to use syntax for object/...