Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function table(input){
- let html = '<table>\n';
- for (let i = 0; i < input.length; i++) {
- let currJson = JSON.parse(input[i]);
- html += `\t<tr>\n`;
- html += `\t\t<td>${currJson.name}</td>\n`;
- html += `\t\t<td>${currJson.position}</td>\n`;
- html += `\t\t<td>${currJson.salary}</td>\n`;
- html += `\t</tr>\n`;
- }
- html += `</table>`;
- return html;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement