Don't see how that differs from any other language.
Any program, no matter what the language its written in can send you bad code from the server you have to download it from.
You also have the javascript engine/c compiler to worry about, which can of course also be malicious.
Then you have the OS to worry about.
Then, given all that, you have people pretending to know what they are talking about and stating they take security seriously to worry about. When clearly, all your base are belong to us.