I have 2 variables and i need to make this as a color. For example:
table1.style.cssText = "color: textcolor; background-color: bgcolor; "
where bgcolor and textcolor – variables with color value (red/black for example)
>Solution :
Use a template literal.
table1.style.cssText = `color: ${textcolor}; background-color: ${bgcolor}; "