4 ms·
Thanks for the feedback! Omitting semicolons early in the guide was an intentional choice. We wanted to ease people in to the JavaScript syntax gently, so we
by aaroniba 18y ago
Thanks for the feedback!
Omitting semicolons early in the guide was an intentional choice. We wanted to ease people in to the JavaScript syntax gently, so we decided to start without semicolons. (We introduce them in the "good habits" section, and use them in all our examples thereafter.)
In JavaScript, omitting semicolons will occasionally get you into trouble, but usually isn't a big deal. (I personally always use semicolons, and use jslint to verify it.) Omitting "var" before variables, however, can be really nasty because it affects scoping, so we felt that was important enough to introduce sooner.
As with all educational material, it's a trade-off between simplifying things for the beginner, and being totally correct. (Kind of like how in physics, you learn mechanics, and then find out it's not totally correct.)
It's true that the tutorial uses commands (like "print") that aren't built into JavaScript. It helps to recognize that we're trying to teach programming in general, not JavaScript specifically (as the headline might imply), and with an audience of total beginners. We feel that the JavaScript language, together with the AppJet framework and website, provide a great environment for beginners to start writing programs.
- sh1mmer 18y agoHey! It's great you are following the threads and responding. That's awesome. I know a number of people who taught Java by starting teaching the basics of programming within a class (e.g primitives, functions, etc) but neglecting the class wrappings. This teaches people procedural programming. They then have to unlearn in order to do OO. Teaching them the basics while asking them to put up with the "framework" means that they aren't unlearning, they gain knowledge of the "stuff" they were putting up with.