There has been much said here about missile weapons and armor... which is an important discussion... but one that seems a bit off.
Archery and it's arrows perform abysmally against the vast majority of armor forms... whether discussing thick felt armor, hard leather or linnen, lamellar, chain, bronze or steel plate, or even the humble layered cloth of a jacked coat. While it is true special arrows were developed to be more effective against specific armor forms... even these only incrementally increased effectiveness as such issues as range and armor quality became relevant. Of course, archery's superior accuracy and rate of fire still make it useful anyway, even against armored opponents... however it is also important to note that most historical armies are rather lacking in armor... though rarely lacking in shields which are also grand at shutting down archery.
In stark contrast the sling is noted for being much more effective against armored opponents than archery. Vegetius is a famous example of this as are the reports form the Spaniards in MesoAmerica (vs Plate no less). While yes, a good helmet does tend to shut down that sweet instakill, how long your helmet lasts and can continue that function depends greatly on the helm. But much more importantly warfare isn't about instakilling... it's about taking folks out of a fight and about making them lose the will to fight. And while helms may shut down instakills, slings will still break the bones of the face, body, and limbs... especially the joints... through most armor far more often than most other weapons. Which is more ideal anyway... what good are the dead? A wounded soldier can be put to work, sold into slavery, or ransomed back home, incorporated into your army, sacrificed (see Aztecs), made examples of, interrogated for info, on and on ... far more productive than a disease ridden rotting dead body. And yes, shields are great for blocking missile weapons... but therein is another sling advantage... quantity of ammunition (mwahaha)... every arrow is expensive... and you are quite limited in your amount of them... not so with slings... sure they are likely to block if they are paying attention... but thats just the thing: "likely." With a sling, you have far more chances
(despite the superior rate of fire potential of the bow). And it has also been mentioned that a slung lead bullet is by far the most difficult missile to block in terms of it's speed and near invisibility in flight... that is HUGE.
As for javelins and other thrown spears... they have the shortest range, the slowest flight speed, the easiest to see coming, the greatest expense, the most encumberance. So shields are MOST effective against these. And while their mass gives them an advantage over arrows in terms of vs armor... armor still works rather well against them, for many of the same reasons it does against arrows... so better against armor than arrows... not as good as slings against armor.
Now of course, all of these weapons of war have their place. The most effective armies employ all of them (and more)... diversity equals stability and the well employed mixed armies are the best (see Alexander and the Roman empire). But I will say that of all of these the sling has the most overall awesome and versatility... and we have the facts and logic to back that up.