JS — create html with javascript

blossom0417
1 min readOct 7, 2018

--

const person = {
name: 'Wes',
job: 'Web Developer',
city: 'Hamilton',
bio: 'Wes is a really cool guy that loves to teach web development!'
}

// And then create our markup:
const markup = `
<div class="person">
<h2>
${person.name}
</h2>
<p class="location">${person.location}</p>
<p class="bio">${person.bio}</p>
</div>
`;

#2 —

'<div class="col-md-3">' + 
'<strong>' + person.name + '</strong>' +
'</div>'

#ref

https://wesbos.com/template-strings-html/

--

--

No responses yet