JSFiddle - React, Tailwind, and code Playground

by ShankarSangoli

HTML

<a href="http://google.com/"></a>

JavaScript

$('a').each(function(){
    $(this).text(this.protocol + "//" + (this.hostname || this.pathname));
});