ES6

Template literal trong CS6

const firstname = ‘John’;
const lastname = ‘Smith’;
console.log(‘Fullname: ‘ + firstname + ‘ ‘ + lastname); //ES5
console.log(`Fullname: ${firstname} ${lastname}`); //ES6

Leave a Comment