%%html
<table></table>
---------------------------------------------------------------------------
io.github.spencerpark.jupyter.kernel.magic.registry.UndefinedMagicException: Undefined cell magic 'html'
at io.github.spencerpark.jupyter.kernel.magic.registry.Magics.applyCellMagic(Magics.java:34)
at io.github.spencerpark.ijava.runtime.Magics.cellMagic(Magics.java:31)
at .(#14:1)
%%js
let people = [
{ name: "Vinay", age: "17", grade: "12" },
];
function generateTable(table, data) {
let thead = table.createTHead();
let row = thead.insertRow();
for (let key of data) {
let th = document.createElement("th");
let text = document.createTextNode(key);
th.appendChild(text);
row.appendChild(th);
}
for (let element of people) {
let dataRow = table.insertRow();
for (key in element) {
let cell = dataRow.insertCell();
let text = document.createTextNode(element[key]);
cell.appendChild(text);
}
}
}
let table = document.querySelector("table");
let data = Object.keys(people[0]);
generateTable(table, data);
---------------------------------------------------------------------------
io.github.spencerpark.jupyter.kernel.magic.registry.UndefinedMagicException: Undefined cell magic 'html'
at io.github.spencerpark.jupyter.kernel.magic.registry.Magics.applyCellMagic(Magics.java:34)
at io.github.spencerpark.ijava.runtime.Magics.cellMagic(Magics.java:31)
at .(#15:1)