title: Trim specific character from a string
body: <p>What's the <strong>JavaScript</strong> equivalent to this <code>C#</code> Method:</p>
  
  <pre><code>var x = "|f|oo||"; 
  var y = x.Trim('|'); //  "f|oo"
  </code></pre>
  
  <p>C# trims the selected character only at the <strong>beginning</strong> and <strong>end</strong> of the string!</p>