I am trying to add a variable inside another variable which is a block of html code. It seems that you cannot just type in the name of the variable into the html code.
<body>
<div id="wrapper"></div>
<script>
var link = "https://google.com"
var codeBlock = '<a href="link">' +
'LINK TO GOOGLE' +
'</a>';
document.getElementById("wrapper").innerHTML = codeBlock
</script>
</body>
I want the result to be a link to https://google.com.