Rest Operator for Objects

object,tipjs,es6

Now we can use rest on the properties of an Object. It allows us to explicitly extract certain named variables, and assign any uncalled variables into a catchall Object.

const options = {
  enabled: true,
  text: 'Hello',
  color: 'red'
}
const { enabled, ...others } = options
console.log(enabled) // true
console.log(others)  // { text: 'Hello', color: 'red' }

Có thể bạn đã miss một số snippets code

Remove array of objects from another array of objects

Remove array of objects from another array of objects

Callback in javascript

Callback in javascript

Promise + gì

promise + gì

using async/await to catch errors

Async await in javascript

Async await in javascript