 <p>Okay, let's break it down. <code>replace(/[\W_]/g, "")</code> means replace every non-word character and underscore with an empty string. So in the string $1.00, it would come out as 100 ($ and . are non-word characters).</p> <p>Then <code>.replace(",","")</code> removes commas.</p> <p>And <code>.replace(".","")</code> removes periods.</p>