<!DOCTYPE html>
<title> JavaScript Template Literals </title>
<script type="text/javascript">
let users = [{
"id": 1,
"name": "Leanne Graham",
"username": "Bret",
"email": "Sincere@april.biz"
},
{
"id": 2,
"name": "Ervin Howell",
"username": "Antonette",
"email": "Shanna@melissa.tv"
},
{
"id": 3,
"name": "Clementine Bauch",
"username": "Samantha",
"email": "Nathan@yesenia.net"
}
]
<!-- JavaScript Template Literals in action -->
let html_markup = `<table>
${users.map(user => `<tr>
<td>${user.name}</td>
<td>${user.email}</td>
</tr>`).join('')}
</table>`;
document.body.innerHTML = html_markup
</script>