JavaScript is a complex topic that can be extremely difficult to get a handle on.
However, it has never been more important to understand it because JavaScript is becoming increasingly prevalent on the websites that we manage.
As the modern web continues to evolve, JavaScript usage continues to rise.
SEO professionals may long for times gone by when websites were static and coded only in HTML and CSS. However, engaging websites often require interactivity, which is usually powered by JavaScript.
What Is JavaScript?
JavaScript is a programming language that allows you to implement complex features on a website, such as dynamic elements or interactivity.
JavaScript is executed once the information from the HTML and CSS in the source code has been parsed and constructed.
The JavaScript will then trigger any events or variables specified within it, the Document Object Model (DOM) will be updated, and, finally, the JavaScript will be rendered in the browser.
The HTML and CSS will often form the foundations of a page’s structure, and any JavaScript will make the final tweaks and alterations.
If you're learning JavaScript, you would have heard how important fundamentals are and not to skip them. But what even are those fundamentals and how to learn them ? Here's a list of JavaScript fundamentals are free resources to learn them ↓
Variables
A variable is a “named storage” for data. We can use variables to store goodies, visitors, and other data.
To create a variable in JavaScript, use the let
keyword.
Variables are one of the most important thing that you need to know and this articles clearly explains what they are, the difference along with a great analogy.
Types
A value in JavaScript is always of a certain type. For example, a string or a number. There are eight basic data types in JavaScript.
We can put any type in a variable. For example, a variable can at one moment be a string and then store a number:
// no error
let message = "hello";
message = 123456;
Programming languages that allow such things, such as JavaScript, are called “dynamically typed”, meaning that there exist data types, but variables are not bound to any of them.
This article explains what data types are and goes through all the different types in javascript.
Arrays and objects
Learn about what objects and arrays are and in this same playlist you can find different methods.
Conditionals
Conditionals are often used in any javascript application and in this video you'll learn about them.
Loops
We often need to repeat actions.
For example, outputting goods from a list one after another or just running the same code for each number from 1 to 10.
Loops are a way to repeat the same code multiple times.
From the series Beau teaches javascript in this tutorial you'll learn the most common loop in javascript which is the for loop!
Functions
This article teaches what are functions effectively utilizing conditionals along with arrays and objects. Quite often we need to perform a similar action in many places of the script.
For example, we need to show a nice-looking message when a visitor logs in, logs out and maybe somewhere else.
Functions are the main “building blocks” of the program. They allow the code to be called many times without repetition.
We’ve already seen examples of built-in functions, like alert(message), prompt(message, default) and confirm(question).
The DOM
DOM stands for Document Object Model. It is a programming interface that allows us to create, change, or remove elements from the document. We can also add events to these elements to make our page more dynamic.
The DOM views an HTML document as a tree of nodes. A node represents an HTML element.
DOM is one of the most important parts of javascript and in this detailed article you'll learn what it is and how to interact with it!
Prototypes
You can't get very far in JavaScript without dealing with objects. They're foundational to almost every aspect of the JavaScript programming language. In fact, learning how to create objects is probably one of the first things you studied when you were starting out. With that said, in order to most effectively learn about prototypes in JavaScript, we're going to channel our inner Jr. developer and go back to the basics.
A great tutorial on beginner's Guide to JavaScript's Prototype.
Async JavaScript
This is a great series of articles to learn about async js.
That's the end of the article, thanks for reading it up till here!
Learned something? -
- Don't forget to like, comment, and retweet the first tweet!
- Follow @ano1herengineer for more!
Quote of the day ~ > Most successful people are people you've never heard of. They want it that way.
fin