I'm trying to add an <a> element around a string that currently exists as a Javascript variable.
The resulting element should display as: 'copyright symbol' + 'companyName' + 'this year's date'. BUT with ONLY the variable 'companyName' acting as an html link
Existing JS
const companyName = "ANY BUSINESS NAME";
function setCopyrightText() {
$("#ifcCopyright").html("© " + companyName + " " + new Date().getFullYear());
}
Existing HTML
<span class="textHeavy fontWhite" id="ifcCopyright"></span>
I've tried several approaches and I'm beginning to realise there must be a simpler solution but I'm missing it _ I've been through several answers on Stack but unsuccessful in finding what I need
Thanks in advance for any suggestions