title: Replacing linefeeds but not \n in a variable (JavaScript)
body: <p>In this case, I want to replace linefeeds(\n) to @ but not \n used inside the variable.
  Are there any ways to distinguish linefeeds from \n inside the code?</p>
  <p>For example, I don't want to replace \n inside this: alert(&quot;abc \n cde&quot;)</p>
  <pre><code>let my_code = `
      alert(&quot;abc \n cde&quot;);
      alert(&quot;efd \n hij&quot;);
      alert(&quot;klm \n opq&quot;);
      alert(&quot;stu \n vwx&quot;);
  `;
  console.log( my_code )
  my_code = my_code.replace(/\n/g, '@');
  console.log( my_code )
  </code></pre>
  <p>online code editor: <a href="https://jsfiddle.net/r6La9mz2/" rel="nofollow noreferrer">https://jsfiddle.net/r6La9mz2/</a></p>