Spread Operator for Objects

tipjs,function,object,es6

Using the spread operator during an Object declaration will assign the properties of the referenced Object to the new Object.

Tips: 5 ways use spread operator

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

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

How to reverse an Array?

Reversing an array in JS is really simple with the standard array method. Like below

Promise.all là gì?

Promise.all là gì? Hiểu và sử dụng promise all trong những trường hợp nào trong vòng 1 phút.

Detect when your site is visible to users

Detect when your site is visible to users

try/catch es10

An update for developer convience allows the use of try/catch without an explicit e Error reference in the catch call.

Remove item in array javascript es6

Những bạn nào mà đã sử dụng ES6 một thời gian rồi thì có thể sử dụng method array.filter()