In general it's best to compound your current skills and not go in a completely perpendicular direction to where you are going now.
Given that: - you are good in JavaScript - you haven't provided much filter of criteria - you mentioned a curiosity in machine learning - you care about job prospects and want a skill that will stay relevant
Have you considered data visualization? If you become a master at that, you can break into the higher level parts of machine learning/data science that require visualizing results to end-users/interested stakeholders. I'm good enough with D3.js to understand examples and create my own modified graphs, but I wish I had the skills to recreate all of the cool visuals you can see in their gallery.