jeudi 30 janvier 2020

Replace every vowel with random vowels and every consonant with random consonants in Javascript

I need a function that takes a string and replaces every vowel in it with random vowels and every consonant in it with random consonants and returns the new string with the same capitalization as the original in Javascript. Is there a fast way to do it?

For example: If the string is “John” then it could return “Lavr” or “Xiqp”.




Aucun commentaire:

Enregistrer un commentaire