Concatenate array
[1,4,67,34,677].reduce((accumulator, current) => accumulator + current, []);
"146734677"
<div id="app"></div> |
<!-- | |
Code lifted from: | |
https://github.com/MicrosoftDocs/mslearn-vue-dynamic-render/blob/main/end/index.html | |
Course: | |
https://learn.microsoft.com/en-us/training/modules/vue-dynamic-rendering/3-render-lists-exercise | |
--> |
<div id="app"></div> | |
<!-- | |
In JS window use dependencies: | |
https://unpkg.com/react@18/umd/react.development.js | |
https://unpkg.com/react-dom@18/umd/react-dom.development.js | |
Use Babel precompiler. | |
--> |
removeAllImgsFilter = function(node){ | |
if (node.tagName=="IMG") //filter out all IMG elements | |
return NodeFilter.FILTER_ACCEPT; | |
else | |
return NodeFilter.FILTER_SKIP; | |
} | |
var walker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT, removeAllImgsFilter, false); | |
while (walker.nextNode()) |
Simply go in your (Chrome) browser to the Likes-page, e.g. https://twitter.com/{your user handle}/likes
and open the DevTools console (CMD OPT i on a Mac). Paste the following code into the console:
document.querySelectorAll("[data-testid='unlike']").forEach( el => el.click() );
This will click all heart icons on that page, in effect unliking all visible Likes. Scroll down and repeat as many times as needed.
It was tricky to set up an outdated Java version. So here are updated instructions to pass the checkpoints (this is well within the Coursera student honor code as it is just an update of the official instructions).
<h1>Week of the year: <span id="weekNumber"> <button onClick="setNum()">click to show</button> </span></h1> | |