It fairs as well as any other dynamic interpreted language.
The benefits you get are that it Just Works in the browser, JS debuggers are best of breed for scripting languages, and is quite a bit faster than almost every other language thanks to the browser arms race.
Problems you will run into is that it is dynamically typed, and hence has trouble being used to maintain large interconnected code base. Many easy to catch upfront errors in a static language will turn into crazy runtime errors (especially where non-numeric types are used with arithmetic operators). Code refactoring tools are practically nonexistent. Object model libraries exist but many are incompatible, making mixing some off the shelf components together very difficult.
My largest pet peeve with JS (and many other languages, including many statically typed ones) is that there is no way to define custom value types. In games, you use vectors a lot. I've often wondered if there are more vector variable/members in the average game than there are scalar values. The problem here is two-fold: creating new vectors requires heap allocations and creates GC pressure, which really does add up in real games to noticeable lag and pauses; you have to jump through hoops to have local pre-allocated vectors laying around for temporary values during calculations. The second problem is that conceptually you wan to treat vectors as value types, and you can and will end IP with a lot of goofy errors where you accidentally modify some vector argument rather than making a copy of it first.
Lastly, owning back to the GC and JS's design, there are many common JS features you just have to avoid using, which removes a lot of attractiveness of JS in the first place. The two biggest examples are anonymous closures (very common for the powerful functional style paradigm they allow in JS) as anonymous objects (used to pass arguments to fictions expecting many parameters or many optional parameters). Having use of those in your core logic can lead to a lot of GC pressure.
My end verdict would be to use JS if you're targeting the Web, because your only other real choice is Flash and that is dying out. If you do use JS, I recommend Chrome as your primary development browser and recommended browser for end users, but remember to test in other browsers you need to support often. The difference in performance for game-related code can be vast, and you don't want to find out last minute that your project only runs reasonably on Chrome.