const repeat= (nums) =>{ //* Done
    let ans = []
    for(let i = 0; i< nums.length; i++){
      if(nums[i] === nums[i+1]){
         if(ans[ans.length -1] !== nums[i]){
            ans.push(nums[i])
         }
      } 
    }
    return ans.length 
}
console.log(repeat(['nsmg33de1','nsmg33de1','2211,','2211','1234','1234']))in this example it seems this function wont work properly there is 3 repeated string in the array but it will output 2
 
     
     
     
     
    