Skip to main content
1 of 3
Arnauld
  • 197.7k
  • 20
  • 179
  • 650

JavaScript (ES11), 67 bytes

Expects ([str1, str2]).

f=(a,i=j=0)=>(a+a)[j]?[a[i].match(/(.)\1*/g)?.[j]]+f(a,i^1,j+=i):""

Attempt This Online!

Arnauld
  • 197.7k
  • 20
  • 179
  • 650