Intsead of this:
What's it all about and why aren't we teaching it that way in S2JS ?
The reality is, if you're a professional web developer writing an app that will be used over many years in a wide range of environments, then using getElementById is the correct approach.
Not using it is a bit of a shortcut, but for our purposes makes the code a lot clearer.
So even though it's not best practice, it makes things much easier in the early stages.
|