I have a function deleting all Dollar Signs from a string.
Can you tell me why
<h1 id="a"></h1>
<script>
function sec_filter_input(s){
s = s.replace(/$/g, " ");
return s;
}
document.getElementById('a').innerHTML = "a" + sec_filter_input("") + "a";
</script>
Returns "a a" (with a space between)? There is no $-Sign in the string, so the expected output is "aa" (without space"
Can you help me?