Chrome DevTools tip #1

var mytotal=0;// ClassName will likely be a string different to that shown:
let myquery = document.getElementsByClassName(“gsc_a_ac”)
for (var i=0, item; item = myquery[i]; i++) {
var mycount=parseInt(item.innerHTML);
console.log(mycount); // <== we can easily monitor the increment
mytotal=mytotal+mycount;
console.log(mytotal); // <== we can easily copy/paste the answer
}
Use cmd+ctrl+C to enable hover context and display ClassName as shown for 2nd row in table

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store