I\'ve an array with a list of elements and I\'m trying to append this list to an HTML element using template strings:
template literals use the toString() method which by default joins the returned array by map with a ,.
To avoid this "problem" you can use join('')
var description = [
'HTML & CSS',
'Javascript object-oriented programming',
'Progressive Web apps (PWAs)',
'Website Performance Optimization',
'Webpack and Gulp workflows',
'Fullstack React.js',
'Web Components',
'Responsive web design',
'Sketch design',
'GraphQL and Relay'
]
$('body').append(
`
${
description.map(function(work) {
return `- ${work}
`
}).join('')
}
`
)