Can anyone help me to get the string characters replacing with '(' for single repetition of a character and replacing with ')' for multiple repetition of a character from a given string in JavaScript.
For Example:
let a = "abbcdeeff";
// Output -> ())(())))