Last active
February 2, 2020 00:50
-
-
Save NimJay/144c26abad3e05ffccd3f2e54e29dbcb to your computer and use it in GitHub Desktop.
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)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment