From the previous samples we learnt that by default JavaScript Replace function replaces only first occurrence of specified string pattern from the provided string text. Then we used an optional parameter "g" that enables the JavaScript Replace function to find and replace all the occurrences of specified string pattern with new string pattern in the provided string text. One more thing JavaScript replace function performs its action with case sensitive approach. In this sample we will use the parameter "i" to perform the case insensitive replace function action. Try the sample below to learn the functionality of parameter "i" and its combination with parameter "g":