7. Remove adjacent duplicate characters from string

  


        let string = "AAABBCDDDAAD";
        let len = string.length;
        let newStr = "";

        for(let i=1; i<len+1; i++){
                              if(string[i] !=string[i-1]){
                              newStr +=string[i-1];
                              }
                              }
                              console.log(newStr)