C++ isn't merely messy--it's a bloated festering gibbering idiot swimming in a fetid pool of infectious waste, the true depth and horror of which is hidden beneath a tapestry of warts and scabs. For the unwary, it seems sound enough, and then a few steps and templates later and the whole rotten structure has given way beneath their feet, plunging them in over their head in offal.
Again, Javascript is a relatively tiny language compared to C++.
No. Don't compare the unalduterated failure that Javascript is to the sound reasons behind C++ messiness.