JSFiddle - React, Tailwind, and code Playground

JavaScript

function resultTable(arr1, arr2, arr3) {

        var result = "<table id='Result' border=1>";
        for(var i=0; i<3; i++) {
            result += "<tr>";
            result += "<td>"+arr1[i]+"</td>";
            result += "<td>"+arr2[i]+"</td>";
            result += "<td>"+arr3[i]+"</td>";
            result += "</tr>";
        }
        result += "</table>";

        return result;
    }

    const names = ['jane', 'john', 'jill'],
    score = [10, 7, 9],
    grade = ['A+', 'B-', 'A']

    var table = resultTable(names, score, grade);
    document.body.innerHTML = table