Translator
Categories
Archives

JavaScript Find and Replace

Follow the example below to perform a find and replace in JavaScript.

<script type="text/javascript">
var myString = "I like coding";
myString = myString.replace('coding','sleeping');
document.write(myString);
</script>

Leave a Reply