This is a slightly odd/unique request. I am trying to achieve a result where e.g “yes” becomes, “yyes”, “yees”, “yess”, “yyees”, “yyess”, “yyeess”. I have looked at this: Find all lowercase and uppercase combinations of a string in Javascript which completes it for capitalisation, however my understanding is prohibiting me from manipulating this into character duplication (if this method is
Tag: permutation
Find all lowercase and uppercase combinations of a string in Javascript
I am looking for this stackoverflow question to be answered in Javascript. So if my input is “word”, the function should return: word, Word, wOrd, WOrd, woRd, WoRd, etc.. here’s what i have so far but it only produces the permutations (doesn’t capitalize anything) Answer One option would be generating capitalization permutations via binary logic. As a simple example of