Learning JavaScript for Real

When Just Enough JavaScript Feels Like None At All

Photo by Greg Rakozy on Unsplash

What’s the DOM?

The Document Object Model, or DOM, houses all of the HTML/XML that’s sent to your browser. When building Rails applications, we were tasked with sending HTML to the client via views, but in JavaScript we use the DOM. To update the information passed to our browser, we use two separate files: an HTML file (our tree/structure), and a corresponding JavaScript file.

Example DOM

Great. So What About That JavaScript?

Now that we kind of understand what the DOM is, let’s talk about what we’ll do with the JavaScript we know.

Accessing HTML elements using JavaScript!

Do I Actually Know Enough JavaScript?

Short answer: Yes. You know enough JavaScript to start, and the things you don’t will just take a moment to commit to memory. As a handy guide, here are two tips that’ll help you conquer the marriage of JavaScript and HTML.

Better Explained By Seasoned Professionals

Hopefully, this quick rundown was helpful, but I’m no expert. If you’re looking for a thorough resource on JavaScript and DOM, check these out:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store