Skip to content

Instantly share code, notes, and snippets.

{
let things = [];
let thingsElement = $0.children; // Select the DOM element that contains the list.
for (let i = 0; i < thingsElement.length; i++) {
const thing = thingsElement[i].children[1].innerHTML; // Change this. Extract the item from its HTML element.
things.push(thing);
}
let glue = "\",\n \""; // Change this.
console.log(things.join(glue));
}