Explore your training options and get exclusive tuition discounts Get Started

X

Back

Learn JavaScript

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.

JavaScript TypeError Cannot Read Property ‘style’ of Null
A typeerror is thrown when a value is not of the expected type. Unlike the value of undefined, the null value can be unintentionally assigned a value developers code into their program. The error represents the absence of any value…
Uncaught Typeerror: $ Is Not a Function
The $ sign in jQuery is a syntax commonly used as a shortcut to access or define a JavaScript library. The code below illustrates that invoking the $ sign or the jQuery method results in all the <p> tags in…
A Guide to Remove Spaces from String in JavaScript
In JavaScript, there are several different ways to filter out whitespace from a string. This article attempts to illustrate ways you can do that with the whitespace characters in your strings by showing you how to do it in five…
JavaScript Date Object: How to Compare Dates
One thing we can do when solving coding problems is use the Date Object to compare dates and times to conditionally render certain logic in our code. This article takes a look at how to use the Date Object to…
JavaScript – Hello World
One of the very first programs you can write to make sure your Node version works is the “Hello World” program. There are two ways to create the program:  in the terminal or in your code editor of choice (i.e.…
Error: Cannot read property ‘setState’ of undefined
When you first start to write React components, you might encounter several different errors along the way. Two such errors are “Cannot read property ‘setState’ of undefined” and “this.setState is not a function”. This article takes a look at a…
JavaScript: Equality Operators
There are four ways to compare equality in JavaScript. This article talks about the unique operators used to determine equality, what type coercion is, and some of the idiosyncrasies encountered when evaluating for a truthy or falsy value in the…
How to Get Dropdown Values with JavaScript
As you learn how to build web forms, one of the most common tasks is to get values from dropdowns. In this article we'll learn how to get such values with JavaScript. Dropdown HTML Element Let's have a quick recap…
The MEAN and MERN Stack
Often when we are developing web applications we divide our app in different layers. In this article we'll talk about what the MEAN/MEARN stack is in the context of full-stack development. What is Full-Stack Web Development In the most basic…
How to Use JavaScript Functions: A Step-By-Step Guide
JavaScript functions are custom blocks of code that can be reused. Functions allow code to be more modular and are essential to object-oriented programming. Functions can be defined through declarations or expressions. If you’re trying to learn JavaScript and looking…
How to Perform a JavaScript Redirect
There are several ways to redirect a web page: client side using the meta tag in HTML, and server side using HTTP redirect methods to name a few. In this article, we look at how to redirect a web page…
JavaScript Random Number: A Complete Guide
To create a random number in Javascript, the math.random() function is used. JavaScript math.random() generates a random decimal value between 0 and 1. The function does not take any arguments. To get random numbers higher than 1 simply multiply the…
How Hard Is It to Learn JavaScript?
JavaScript is one of the most important programming languages for modern web development, after HTML and CSS. Along with PHP, it’s among the suite of languages that makes web pages dynamic and responsive.  If we only had HTML and CSS,…
Is JavaScript Front End or Back End?
JavaScript is everywhere. As one of the foundational web development languages (along with HTML and CSS), it helps power a large fraction of the websites on the Internet. And since it’s partly responsible for adding the functionality we’ve come to…
JavaScript Timestamp: A Step-By-Step Guide
To get a JavaScript timestamp format can be achieved using the Date() object, which holds the current time in a readable timestamp format. You can also create new Date() objects with different timestamps, and get the current Unix time using…
JavaScript Coding Challenges for JS Junkies
Being a JavaScript coder is a little like being a gunslinger: there’s always going to be someone younger or faster coming for you. That’s why you’ve got to keep your senses sharp and your mind open. You have to keep…
JavaScript Operators: Comparison and Equality
We first encountered operators when we were children learning arithmetic in elementary school. Operators are the symbols in between two operands. In web development, we use operators to compare two values to determine if an expression is true or false.…
JavaScript Booleans: A Guide
How to Use JavaScript Booleans True or false values are everywhere in programming. We call these values Booleans. They can be used to compare two or more values and control what parts of a program should run. In this guide,…
this JavaScript: Understand This Once And For All
Understanding JavaScript this keyword If you want to become a programmer, no matter which specific field you choose, you will almost certainly need to tackle JavaScript. It has evolved from humble beginnings into a true powerhouse. It now covers front…
JavaScript Shift and JavaScript Unshift: A Complete Guide
JavaScript shift() removes an element at a specified position and shifts the remaining elements up. The JavaScript unshift() function does the opposite. unshift() adds a new element at a particular position and shifts the remaining elements down the list. You…
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…
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 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…
Start your Tech training
Find, compare, and enroll in the right training program. Save on Tuition.
View my matches