I see the link to the Stanford course, but I hope it's still in the minority. JS is not a language that I would want to teach to newbies, especially if those newbies are on a path towards a CS degree.
I see the link to the Stanford course, but I hope it's still in the minority. JS is not a language that I would want to teach to newbies, especially if those newbies are on a path towards a CS degree.
There are plans to switch out Java for Python eventually but no major classes are taught in JavaScript--the closest it gets is a graduate Programming Languages class that spends a few weeks on JavaScript to illustrate closures and first-class functions.
To be fair, though, many undergrads take graduate classes and the department encourages it--the only difference is a 2XX course number instead of 1XX, and sometimes a bit more rigor.
But, like a machine learning course, or a data science course, which also touch on many concepts which are part of a core Computer Science curriculum, it is not a center because the center of a good Computer Science curriculum is the core concepts through which all other ideas flow (algorithms, data structures, message passing and communication, programming language design, compilers and interpreters, object oriented design, functional programming, etc).
Generally all the rest is (and should be) elective. And most curriculums presumably require electives so students can delve into areas they're interested in applying the aforementioned skills to.
JavaScript is great because it runs in a browser, provides immediate feedback without having to compile/recompile and allows for all the simple flow control concepts mentioned by other posters.
JS shares this property, but also gains the benefits of being widely used in industry and available in every web browser, with a good debugger in Firefox and Chrome. I'd never really considered it as a teaching language, but I think it'd be a great choice.
Why is this important for students, anyway? Shouldn't they be exposed to mutability fairly early on?
http://journal.stuffwithstuff.com/2013/07/18/javascript-isnt...
http://brendaneich.com/2008/04/popularity/
JS certainly does have other influences, notably Self and Java. But from that article:
"As I’ve often said, and as others at Netscape can confirm, I was recruited to Netscape with the promise of “doing Scheme” in the browser....I’m not proud, but I’m happy that I chose Scheme-ish first-class functions and Self-ish (albeit singular) prototypes as the main ingredients. The Java influences, especially y2k Date bugs but also the primitive vs. object distinction (e.g., string vs. String), were unfortunate."