Right now I'm using Python (saltstack), Ruby (rails) and JS (node & react) to build an in-house system for the company I work with - in fact most projects I work with use at least two languages at once, depending on what we need client or server side.
I don't really have too many issues switching between languages since I started guarding against it by ensuring I complete small blocks of functionality each side rather than jumping between them continually on a single feature (which isn't really an effective way to work anyway).
For example, if I'm working on a site and I've got Rails one side and JS the other - rather than implementing a feature by ping-ponging between the two until it works, I'll implement one side first (which I choose depends on the requirements of the task), and then the other - and reiterate if needed. Unit and integration testing ensures I can define and verify my work without needing both parts present.
In short, it can be confusing if you are constantly jumping between them - but if you are doing that you probably need to refine your workflow and relieve yourself from doing that. Focusing on each side independently also ensures you give it your full attention and you don't make sacrifices you don't need to or overlook things.
Hope that helps :-)