JavaScript is one of the most widely used programming languages today. These articles and resources will help you learn JavaScript, whether you are looking for a full-time intensive bootcamp course or self-learning online tutorials. Not only do we review various resources to learn JS, but we also provide exercises, comparisons to other coding languages, and individual articles on JavaScript errors and protocols. Finally, we examine if JavaScript is worth learning today.
Learn JavaScript
JavaScript: Capitalize First Letter of Each Word in a String
There’s many beginner-friendly code challenges that will help you to start thinking more like an engineer. One such challenge is one where you capitalize the first letter of every word in a given string. In this article, we’ll take a…
JavaScript Math Object: Round
This article will show you how to use the Math Object to figure out how a floating point number rounds to the nearest integer. As a reminder, when we round a number, we look to the right of the decimal…
JavaScript Methods: Object.assign()
JavaScript has an Object class that has all sorts of methods we can use to manipulate those objects. In this article, we’ll take a look at the Object.assign() method and demonstrate how it’s used. A Little Background As a reminder…
JavaScript Methods: charAt() Method
There exists a String object method in JavaScript that gives us the ability to figure out which character is at a given index in a string. This article will tell you about that method and show how to use it.…
JavaScript Methods: toFixed() – a Number method
There exists a Number object method in JavaScript that allows us to set a fixed decimal point on a number and then returns it as a string. This article will talk about the syntax of this method and illustrate how…
JavaScript Math Object: Absolute Value
This article will show you how to use the Math Object to figure out the absolute value of an input. As a reminder, the absolute value of a number disregards the sign – it assumes that all numbers are 0…
React Components – Functional vs. Class
React-js is a JavaScript framework that allows us as developers to encapsulate code to make it more reusable. These encapsulated code snippets are called components. They can hold their own logic and state without interfering with what’s going on in…
How to Use JavaScript Promises
Asynchronous code used to be a pain to write in JavaScript. To write asynchronous operations in your code, you would have to deal with multiple levels of callback functions. The more functions that you introduced into your code, the harder…
How to Use JavaScript Callback Functions
You’ve probably seen a few code snippets use the word “callback” inside a function. Callbacks are a special type of function that are passed inside another function. Callbacks are often used inside event handlers to run a block of code.…
JavaScript Switch Case: A Step-By-Step Guide
The JavaScript switch case is a multiple if else statement. It takes a conditional expression just like an if statement but can have many conditions—or cases—that can match the result of the expression to run different blocks of code. Conditional…
Web Fundamentals: Scope and JavaScript Closure – a Primer
One of the biggest buzzwords in the JavaScript language is closure. It’s the subject of many job interview questions at FAANG companies. In this article, we’ll talk about closure and scope, illustrate its concepts with simple examples, and then finish…
JavaScript Pop Method: What Is It and How to Use It
The JavaScript array pop method called is one of several array methods that can be used to manipulate data in arrays. Web developers use it in times when they need to do something either with the shortened array or with…
JavaScript Set: A Guide for Beginners
How to Use Sets in JavaScript Do you have a list of data that should only contain unique values? This is where the JavaScript Set data type really shines. It's a new type of object that allows you to create…
JavaScript Fetch: A Guide
Did you know that you can make web requests in vanilla JavaScript? That’s right, you don’t need to install any libraries to make a web request. That’s not all: we’re not talking about the old, complex XMLHttpRequest tool. The fetch…
JavaScript Class: A Guide
JavaScript is based on prototypes. Every time you declare an object, a prototype property is created which extends the properties and methods associated with that object. Over the last few years, many JavaScript developers have sought ways to incorporate object-oriented…
JavaScript Array: A Guide for Beginners
Let’s create ourselves a list of fruits. We’ll call our list “fruit”, and add the following values: Banana, melon, grapes. Oh, how I love fruit! While this may sound like a tutorial on shopping lists, we’ve actually just created ourselves…
How to Use JavaScript’s getElementById Getter
So, you want to select an element on a web page in JavaScript? That's the specialty of the getElementById method, the so-called king of the element getters in JavaScript. getElementById allows you to select an element based on its ID.…
JavaScript Reverse String Code Challenge
One of the first code/algorithm challenges that we set out to solve as budding software engineers and web developers is to see if we can figure out how to reverse a string. Remember that a string is just a collection…
JavaScript Syntax: A Guide for Beginners
If you’re looking to learn how to write JavaScript, you’ve come to the right place. Every programming language has its own set of rules, just like English. Think about it. When you were in elementary school, you learned the rules…
JavaScript Date and Time: A Guide for Beginners
There’s no escaping the clock, especially in programming. Just as we rely on clocks and watches to keep track of our days, so do programs use time-tracking tools to know what should happen and when. Several applications need to track…
JavaScript Cookies: A Guide
Cookies are both a delicious snack and a crucial part of modern websites. Cookies allow you to store data about a user in the web browser. Cookies often store information like authentication sessions so the browser remembers you have logged…
JavaScript Objects: A Guide
While lists are a useful method of storing data, they are inconvenient to use when you want to store multiple properties about a specific object in the list. For instance, if you want to store data on all the cookies…
JavaScript Events: Three Ways to Create an Event
Adding interactive features to a website is where JavaScript shines. Whereas HTML and CSS are used to set the structure and styles of a web page, respectively, you can use JavaScript to make your site more dynamic. In JavaScript, events…
JavaScript Math: A Guide for Beginners
Computers are really good at math. It’s in their metaphorical blood, considering computers are powered by the 1s and 0s that we call binary. When you’re coding, there’s probably going to be a time when you want to perform some…
Map JavaScript: A Guide to the .map() Method
Programmers like to reduce repetition in their code. The more you repeat your code, the less maintainable it is, and the slower your programs will run. That’s the reason why there are various methods in JavaScript to iterate through datasets.…
querySelector JavaScript: A Guide
getElementById. getElementByClass. You may have heard about these functions before. They both allow you to select a particular element in JavaScript. Once you’ve selected an element you can change its contents, modify its state, or even make it disappear. There’s…
JavaScript Default Parameters: A Beginner’s Guide
Default parameters make working with functions a whole lot easier. Using default parameters, you can tell your functions what parameters they should use in the case that you haven’t specified any. This can help avoid errors and makes your code…
JavaScript localStorage: A Guide
Web applications can get very complicated, very quickly. One thing I’ve learned in my time as a developer is that there’s a lot you can do with plain old JavaScript if you give it the chance. The localStorage API is…
How to Use Async and Await in JavaScript
Introduced in ES6, Promises allow you to easily write asynchronous code without having to deal with different callback functions. With Promises, there’s no need to worry about multi-level callback functions which are both difficult to write and maintain. There’s another…
JavaScript Console: A Guide for Beginners
Writing code, while entertaining, can also become quite tedious. There are days when you start writing code, realize something is not running, and get very frustrated. Even more annoying is when your code runs, but you can't figure out why…