Loading homepage
Serialize a tree of element objects and text nodes into an escaped, indented HTML string. This is a string-building function exercise; no HTML or CSS files are required.
Input: serializeHTML({ tag: "div", children: [{ tag: "p", children: ["Hello"] }] }); Output: <div> <p> Hello </p> </div>
Use the documented contract in JS and TS.