Answers for "javascript forloop table"

0

javascript forloop table

function get_table(data) {
    let result = ['<table border=1>'];
    for(let row of data) {
        result.push('<tr>');
        for(let cell of row){
            result.push(`<td>${cell}</td>`);
        }
        result.push('</tr>');
    }
    result.push('</table>');
    return result.join('\n');
  }
Posted by: Guest on April-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language