document.getElementById("your element").style.fontSize = "20%"
// get reference to element using its ID or querySelector
const myElement = document.getElementById("elementID");
// pass element reference and getPropertyValue of font-size
const size = window.getComputedStyle(myElement).getPropertyValue("font-size");
document.getElementById("foo").style.fontSize = "18"
const fontSize = window.getComputedStyle(document.getElementById("yourFontSizeinCSS")).fontSize;
const size = parseFloat(fontSize);
document.getElementById("one").style.fontSize = `${size * 3}px`;
const element = document.querySelector("#id");
const size = window.getComputedStyle(element).getPropertyValue("font-size");