String .replace() does not work with '$' symbol : <p>So, I cannot figure out what is wrong? I know that <code>.replace()</code> returns a new string, without mutable existing. It's really ridiculous, but I'm stuck on this. I need to replace '$' on '2', but it just concat string, not replace the value...</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var answer_form = '$0';

var question_num = 2;
answer_form = answer_form.replace(/$/g, question_num); 

console.log(answer_form);</code></pre>
</div>
</div>
</p>
