Essentially, trying to pass different (string) values to a variable
if (result == "A")
finalLink.push("https://pool.wikitolearn.org/images/pool/d/d0/Not-giant-enough-letter-a.jpg");
if (result == "B")
finalLink.push("https://img.clipartfest.com/a354883c247102b05c1657698b7bc8ed_-letters-b-23-b-boyjpg-the-letter-b-clipart_205-257.jpeg");
if (result == "C")
finalLink.push("http://dailydropcap.com/images/C-9.jpg");
and then send the variable to html href tag
<a id="button" href="finalLink">Click me to be redirected to your answer</a>
don't know much javascript but in PHP you can do this by adding {{variableHere}}
pushis an Array method. Did you mean to make use of an array there?