JSFiddle - React, Tailwind, and code Playground

HTML

<div></div>
<div></div>
<div></div>
<div></div>
<span></span><br>
<span></span><br>
<span></span><br>
<span></span><br>
<span></span><br>

JavaScript

HTMLCollection.prototype.each = function(callback){
	for(var i=0; i<this.length; i++) callback(this[i]);
};

document.getElementsByTagName('div').each(function(div){
	div.innerHTML = "stuff";
});

NodeList.prototype.each = function(callback){
	for(var i=0; i<this.length; i++) callback(this[i]);
};

document.querySelectorAll('span').each(function(div){
	div.innerHTML = "things";
});