From my own experience, if you can do either javascript or PHP, you can do both of them. These languages have similar syntax and the same scripting language and style, so just choose either one, and you're good to go. My favourite language is javascript, because you can do mobile, frontend, and also backend with just one language