How can I parse the value of the constant named currentTab to that of the one named tabToActivate?
function panel(event) {
const tab = event.currentTarget.closest(".tab");
const container = tab.closest(".login-sign");
const currentTab = event.currentTarget.dataset.forTab;
const tabToActivate = container.querySelector(".tabcontent[data-tab ='${currentTab}']");
console.log(tabToActivate)//outputs null perhaps due to improper parsing
}
".tabcontent[data-tab ='${currentTab}']"- a template literal uses backticks and not regular quotesconst tabToActivate = container.querySelector(`.tabcontent[data-tab ='${currentTab}']`);