mystring = mystring.replace(/(..)/g, '$1:').slice(0,-1)
This is what immediately comes to mind. I just shoot the final character to get rid of the colon at the end.
If you want to use this for odd-length strings, you just need to make the second character optional. For instance:
mystring = mystring.replace(/(..?)/g, '$1:').slice(0,-1)
source share