Having javascript enabled makes you substantially more vulnerable to a variety of hacking techniques. Javascript being enabled can not directly lead to your IP address being revealed in the same way that having Flash or Java enabled can, and it will take a substantially more skilled attacker to get your IP address via a javascript aided exploit. However, there are many many many scenarios in which having javascript enabled could result in an attacker being able to determine your IP address when they would not otherwise be able to do so.