I want to wrap an <a>
element around a JavaScript variable containing a string. The desired output should be the 'copyright symbol' followed by the 'companyName' linked as an HTML link and then the current year's date.
JavaScript Code
const companyName = "ANY BUSINESS NAME";
function setCopyrightText() {
$("#ifcCopyright").html("© " + companyName + " " + new Date().getFullYear());
}
HTML Code
<span class="textHeavy fontWhite" id="ifcCopyright"></span>
I have tried multiple methods, but I believe there must be a simpler solution that I am missing. I have searched through various Stack Overflow answers without success in finding the solution I need.
Thank you in advance for any suggestions.