I think it's worth learning because it's quite different to your run-of-the-mill OO language and at the very least you'll learn a different programming paradigm.
This question on Stack Overflow addresses some examples of where it is and can be used outside web programming.
In my opinion, on Windows it's the most palatable choice, because the alternatives are VBScript and BAT files (at least if you can't rely on additional installs).
Technically of course this is still "web stuff", but it's different in that the web developers aren't the (only) ones using it.
It is not worth learning beyond the basics.
I was going to add this as a comment to the accepted answer but then realized it might be better served as a separate answer. That said, it is meant more as a complement to the accepted answer rather than a competing answer.
It is :
- easy to learn
- supports both procedural and object-oriented paradigms
- is quick to write and get running
- popularised many modern language concepts - closures, anonymous functions, asynchronous/event-driven programming, dynamic types/inference
- has great tools ( editors, runtimes, lint tools, browsers)
- has amazing online support with lots of active communities
- can do maths functions
- has graphics abilities (via HTML/Canvas)
- can use it to write Apps
I personally believe it is worth learning even if you won't use it daily. It will broaden your mind such that you consider different solutions when using other languages like C++ or C# - e.g. Iteration versus Algorithmic solution, dynamic typing and type inference.
I have seen people use it to crunch numbers/data dumps faster than professional tools, by pasting their data into an HTML text area of a page they'd constructed with some JS code behind to work through the data.
What else is it good for?
Embedding inside something else:
Before jQuery/Prototype and the whole AJAX movement came along, the choice of JS seemed non-obvious - why not use VBA (shudder), something lex+yacc-able or roll your own language? The power of JS as a language combined with rich widgets/frameworks meant not a whole lot of code needed to be written, so an off-the-shelf solution was attractive as more effort could be spent on the rest of the product.
As the language has increased in capability and speed, the bet on JS has paid off. With more developers able to grok JS, hiring is easier too.