JSFiddle - React, Tailwind, and code Playground
by Addy Osmani
JavaScript
var url = 'abc'; //submitter should probably call this something else as URL may be confused with a complete URL and not a hash/anchor
var text = 'google';
var a = $('<a href="#' + url + '">' + text + '</a>');
alert(a.attr('href'));