ES6

Spread Operator trong ES6

const listNumber = {
    one: ‘1’,
    two: ‘2’,
    three: ‘3’
}
//console.log(`Number: ${listNumber.one}`); //1
const listNumber_new = { …listNumberfour: ‘4’five: ‘5’ };
console.log(listNumber_new);
const arrNumber = [123];
const arNumber_new = […arrNumber4];
console.log(arNumber_new);

Leave a Comment