There isn't really a timeframe that we can give you - it highly depends on the time you're putting in, your ability to learn, how you're learning, etc. These aren't really measurable, and the only true answer is "it takes how long it takes". The minimum time to learn javascript is probably a few months, though.