Sunday, 30 April 2017

How to replace character 'a' with 'b' and 'b' with 'a' in a string?

Suppose I have the following string.

blaah blaah blaah blaah

the resulting string should be:

albbh albbh albbh albbh

Is there any built in method in JavaScript to find and replace a character like this in a string?



via essaji

No comments:

Post a Comment