I have Javascript code :
document.getElementById("Grid").style.gridTemplateRows = "repeat(3, 2fr)";
How do I insert variable as argument to modify my CSS style, when I try:
"repeat(${MyVariable}, 2fr)";
it seems doesn't work ?
I have Javascript code :
document.getElementById("Grid").style.gridTemplateRows = "repeat(3, 2fr)";
How do I insert variable as argument to modify my CSS style, when I try:
"repeat(${MyVariable}, 2fr)";
it seems doesn't work ?
Copyright © 2021 Jogjafile Inc.
${MyVariable}belongs in backticks (template literals)so EITHER
OR