MCPcopy Create free account
hub / github.com/marijnh/Eloquent-JavaScript / addProp

Function addProp

src/client/sandbox.mjs:602–606  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

600 block.className = "sandbox-output-etc-block"
601 let table = block.appendChild(document.createElement("table"))
602 function addProp(name) {
603 let row = table.appendChild(document.createElement("tr"))
604 row.appendChild(document.createElement("td")).appendChild(span("prop", name + ":"))
605 row.appendChild(document.createElement("td")).appendChild(represent(val[name], 40))
606 }
607 if (type == "array") {
608 for (let i = 0; i < val.length; ++i) addProp(i)
609 } else {

Callers 1

expandObjFunction · 0.85

Calls 2

spanFunction · 0.85
representFunction · 0.70

Tested by

no test coverage detected