As someone with a traditional CS background who's learning JavaScript & HTML5 right now, I have to agree that learning JS in the context of a web browser feels like a poor choice for beginners. There are way too many gotchas, hangups, incompatibilities, etc. with browsers and a big domain of knowledge to learn with the DOM.
That said, I think if you teach JS in the context of Node.js with liberal use of quality npm packages like mocha for unit testing, etc. it could be a fantastic environment for beginners and ease a lot of frustration. Just having a REPL is reason enough to use Node for beginners.
That said, I think if you teach JS in the context of Node.js with liberal use of quality npm packages like mocha for unit testing, etc. it could be a fantastic environment for beginners and ease a lot of frustration. Just having a REPL is reason enough to use Node for beginners.