ough it is the main client-side scripting language of the internet, JavaScript opens up a lot of potential attack vectors.
JavaScript can easily be blocked by default in your browser settings, and then whitelisted on a per-site basis. This allows you to maintain full web functionality as well as the security of having it disabled by default.
AdBlockPlus blocks external scripts by default, however it is not possible to block all inline scripts. You must use your browser settings for this.
The main reason for blocking JavaScript is to protect against compromised/malicious websites. Many websites have cross-site scripting (XSS) vulnerabilities that allow potentially malicious JavaScript to be inserted into a page by anybody, often by using a badly designed comment form.