Does the JavaScript course ever explain how to connect JavaScript to DOM?

So I know that the course explains how to understand the coding language in general, but does it ever explain how to use JavaScript to connect to the DOM? To use JavaScript to affect the HTML and CSS files itself? (click a button on a webpage and change the color of the button for example)

No

See also Javascript : Tutorials for "Dummies"? - #2 by deeess

The page doesn’t open.

I think you meant to link Javascript : Tutorials for “Dummies”?

1 Like

I didn’t do this course (I work as tech lead/software architect with >12 years of experience) hence I can’t talk from the PoV of having completed this specific lessons.

On the other hand, it may shock some people but when learning to code in any language, you actually need to learn how to code with it, and that’s usually done through CLI (command line interface) for the sake of simplicity and going straight to the point.

Using JS in the DOM is just one subset of the language API and any college or vocational studies academy sees it this way (and for good), so DOM is set as “next steps” in the learning process.

For reference, see the overview of Computer Science:

  • Data storage
  • Data management
  • Operative Systems
  • Networks and Internet
  • Algorithms
  • Programming languages (including Compilers, Transpilers, Bundlers)
  • Software engineering (including Software Architecture)
  • Data Abstractions
  • DBMS (database management systems)
  • Computer Graphics
  • Machine Learning
  • Computation Theory

All this is agnostic to “DOM” or specific APIs.

Now let’s take a look at what you can do with JavaScript:

  • Frontend Web Development (here you have DOM API)
  • Backend Development (e.g. Node, no DOM API here)
  • Data Access (Sequelize, Prisma, TypeORM, Mongoose…)
  • Full Stack web development (Next JS, Nuxt JS, Remix… You’ll have DOM API just in the FE part of them)
  • Android/iOS Apps (e.g. React Native, You’ll probably use the DOM API which will be mapped to native API behind the scenes, usually using a browser behind the scenes).
  • Desktop Apps (e.g. Electron, PWAs… you’ll have DOM API the same way you do in mobile w. react native).
  • Cross-Platform APPs (PWAs, same as above).
  • Embedded systems (e.g. Raspberry Pi, you’ll use Node or any other RE -Runtime Environment- without DOM API).
  • Machine Learning (Brain.js, Tensorflow.js, no DOM API here either).
  • Blockchain, “web3” (Web3.js, Truffle… no DOM API here either)
  • Scripting (depending on the context you’ll have the DOM API available somehow or not, e.g. you’ll have it in certain places when using playwright or similar tools to script websites inside a runtime-raised browser. You won’t have it when working with CLI or system scripts).
  • Web OSs (you have DOM API just in the frontend side)
  • IoT (e.g. Cyclon JS. You won’t have DOM API here either).

As you can see, having the DOM API available or not is dependant on the Runtime Environment (the browser, Node, Deno, Bun…) available to you in a given context.

The DOM API is just one of the Web APIs. Whether learning the DOM on an early stage is good or bad is opinionated, but I believe that learning it is just one more piece on the learning process than any other thingy.

The importance of the DOM is that in most places (as you can spot in the list above) we use browsers behind the scenes to allow for device compatibility through the permissions policy directives and specific APIs.

Probably we can all agree on that the DOM API requires some knowledge of other bits and pieces of JavaScript and also cross-knowledge with HTML and CSS, hence being “stage 2” of a JavaScript learning process, after at least the basics of the language.

Even most courses in YT and other platforms begin with “here’s an HTML, here’s a JS file, here’s how to connect two and here’s how you execute it” I truly believe it may hurt the end goal of learning the language (and then learn the platform you prefer first, e.g. you won’t need DOM to code REST/GraphQL/gRPC Services and Micro-Services and maybe that’s all you need to start earning for a living in software development).

Best regards

2 Likes

Your breakdown of the different areas where JavaScript can be utilized is insightful, especially for those who might not be aware of the language’s flexibility. From backend development with Node.js to machine learning applications and even blockchain technology, JavaScript has a role to play in many facets of modern computing.

As mentioned in other comments, JavaScript is used for a lot of different things now a days. If you are interested in the DOM api then you can also check out these sites. They are also great for explaining a lot of other topics you might come across.

It sounds you already have an understanding of the javascript course and just need a nudge on where to start with DOM manipulation. The first two sites will get you going. If you are interested in a more comprehensive course to web development overall then check out the third one.

For a more comprehensive introduction to web development, consider exploring courses that cover HTML, CSS, and JavaScript together. Revit 2019 features that enhance 3D modeling and documentation. This will give you a deeper understanding of creating interactive web pages. Good luck with your learning and experimentation!

This is James Harry. He lives in Switzerland. When he was learning JavaScript, he had to face many difficulties, so at that time he was accompanied by Assignment Help Switzerland, their expert people guided me very well. Because of them, he is in a good position today.