How to Use Variables in Template Literals (``) in JSP
While writing a function in a JSP environment, not React, I had trouble: the values passed in as variables printed fine in console.log(), but did not come out correctly when I used the variables.
A senior coworker showed me the fix, and applying it as below solved the problem.

js
function markPosition(mark, target){
let markBox = document.querySelector(`.markBox\${target}`);
}- #JSP
- #Template literals
- #``
- #Variables
- #Output Error
- #Template Literal Error