This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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)); | |
} |
NewerOlder