JavaScript isn't really important for non-web development. I used to program video games for hand held consoles and JavaScript was the last thing on my mind.
Okay, maybe I was working for the unmentioned 1% (and for what it's worth, the company I currently work for uses JavaScript). And really, it's not a bad idea to learn JavaScript - it's pretty ubiquitous and chances are you will work for a company that uses it at some point in your career. But honestly, I'm getting a little sick of all these articles that seem to forget that there is more to programming than web apps.
Don't know what you mean by this comment. There already are plenty of games written exclusively in Javascript. I've written a couple myself. Even if you exclude html5/websockets, it's entirely possible to write a server/client game, even a complex one, just with AJAX (Asynchronous JAVASCRIPT And Xml). And that's not even counting the tons of singleplayer games, hell look at the JS1k and JS10k contests, most if not all of the entries were games.
Yep, exactly. I expect that as node.js rises in popularity in general, JavaScript's use as an embedded game scripting language will rise (possibly at the expense of Lua and Python).
Actually now that I write this, I wonder about the possibility of JavaScript game scripting combined with something capability-aware like Caja for hosted game mods. Could be an interesting area to explore.
There is a robust implementation of JavaScript for the JVM (Rhino), part of which even ships with Java 6, so scripting a Java-based game seems a straightforward step. On .NET, JScript similarly seems to be an almost first-class citizen (though, unlike Rhino, I've never used it).
LUA and ActionScript (for UI work mostly) are well represented in games companies already, I would think JavaScript will get some exposure if someone goes the extra mile to open their UI in the way that Blizzard have done to addon development (LUA).
If you're writing games with Unity, there's a good chance you'll be using Javascript, as they have implemented Mono/Javascript (with their own extensions) as one of the engine's main languages.
Of course, DOM is utterly irrelevant here, just wanted to point out its use in games.
the very popular Unity3D engine supports JavaScript as a scripting language btw. Many people use that to develop iOS/Android games and even Browser/PC/Mac games.
Same here on regular consoles. We did use lua and once UnrealScript and the reduction in iteration time to seconds was worth any loss of speed in the short term (i.e. discover the game, then downcode what you need to later).
However, times have changed. The kind of games i'm interested in are ubiquitous in nature. I want to interact with it on the console, the iPhone, the PC, and on the web. I want to write tools that are cross platform. The browser is the ultimate cross platform.
Yeah, we actually did use Lua on some of our games. I'm not saying JavaScript is too slow for games, or can't be used for games, just that it wasn't very useful for console development at the time I was doing that. Plenty of games have been written in JavaScript, although almost all of them are web-based games (and I specifically said it's not that useful for non-web development).
Okay, maybe I was working for the unmentioned 1% (and for what it's worth, the company I currently work for uses JavaScript). And really, it's not a bad idea to learn JavaScript - it's pretty ubiquitous and chances are you will work for a company that uses it at some point in your career. But honestly, I'm getting a little sick of all these articles that seem to forget that there is more to programming than web apps.
Edited to remove snarkiness.