if you're starting with JavaScript , you can try out the very basics in your webbrowser. (go to about:blank => right click => inspect element => console)
with very basics I mean , make a few functions, make some variables, try out some loops etc.
sometimes the javascript is disabled in the browser (for example on Safari) so you first have to change the preferences. in Firefox it should be enabled by default.
if you want to write some complexer functions and classes, you should find yourself an IDE (integrated development environment) which will make it way easier.
I use WebStorm for Javascript (but this costs quite a lot if your just trying it out),
so I recommend to download a free one first.
2 powerful IDE's that you can use are : NetBeans or Eclipse
for C/C++ you obviously can't do it in a browser, so you have to use an IDE from the beginning.
a good one for C/C++ is CodeLite (=> and it's also free);
if you're interested in writing Java, I use IntelliJ for that (again, not free)
but free ones out there are BlueJ , NetBeans, Eclipe (some IDE's can be used for multiple languages)
for Python again, you can use Eclipse