I want to have managed meta data navigation on my sites.
Is there any way I can do using code or by JS ?
Managed Metadata based navigation is only available for Publishing Sites. Neither MySites host, nor actual MySites themselves do not have the Publishing infrastructure activated (at least the feature at the site collection level is needed).
If that does not cause any issue for you (with regards to governance policies in place), activating it should give you the needed capability. You would need to consider automating this upon any new MySites site collection creation - most likely a stapler feature should do the job.
Alternativelly, for a Javascrip based naviation solution which is based on the Managed Metadata - Waldek has 2 great around it http://blog.mastykarz.nl/global-navigation-sharepoint-2013-revisited/