eg:

    1. <script>
    2. var str ="hello";
    3. console.log(str.replace("l","*")); //he*lo
    4. </script>