Learning JavaScript

Learning JavaScript

When learning how to code, there's a lot of places and languages you can start with. To get the feel of writing code, I started with HTML. I learned the basic concepts, like headers, paragraphs, and images, and other more common elements on a webpage.

From there I moved to CSS, where I learned how to style pages. Again learning the concepts, I kept in mind properties like margins, the difference between % and px (and when to use them), and using positions. Again, things you would use on a daily basis.#

As I'm currently learning JavaScript, I'm noticing that there is a clear logical pattern. You first create a variable, and a true/false function. This true/false is referred to as a Boolean, and they are used as functions to get the value of a variable that you've created.

Once you create this function (written as if(something == true/false), then you can tell the DOM, (let's say JavaScript for now), what you want to do.

And finally, to actually carry this function out, you create an EventListener, which "listens" for any events (like a click), and then once the click is "heard", your function can be carried out. It sounds more complicated than it actually is, and after building a few projects, things slowly start to make sense and come together.