Modern JavaScript?


#1

The syntax of modern JavaScript is using let more than var more and more in open source projects and beyond (Electron-based, Webpack, etc.). Are there any solid plans to move away from teaching the problematic var variable declaration over the block-scoped let?


#2

Just a heads up to other educators. Most of the resources online and in print that help others learn JavaScript are really out of date. Recent professional adoption of ES6 and 7 is widespread and includes very important additions including the following:

  • let
  • const
  • class
  • ()=>{}

One particularly important—and controversial—point is the use of semicolons. GitHub, Twitter, NPM, and many other large organizations have moved away from them—even including leaving them out in the new standardjs.com. Leaving out semicolons is tremendously helpful for beginners. The cases where no including them causing a problem are very esoteric and rare. Better to memorize those very specific cases as they grow beyond beginners.

It is actually no longer in a student’s best interest to teach the old JavaScript—especially for those not entering the professional world for several years to come. Teaching the old JavaScript will force relearning later that could confuse them. Best now to keep up on modern JavaScript as professional used and only teach that.

I realize not many will care to hear this, but I feel its important to spread the word.

For this and other reasons concerning failure of students to pass basic assessments after completing the Mountain has caused me to significantly limit CodeCombat in class. We do one level of the dungeon in Python and JavaScript to get a general sense of programming. The rest we do as an interactive story from the command line using node (which I strongly recommend).