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
What is the Javascript DOM?
The JavaScript Document Object Model (DOM) is a representation of the HTML elements of a webpage. It is an interface we can use to manipulate a web page by changing its content or style. We can access the DOM by…
JavaScript TypeError
In JavaScript, a TypeError is an object that represents an error as a result of doing an operation that cannot be performed, usually because a value in an operation is not of the expected type. But what are types? According…
JavaScript SyntaxError: missing ) after argument list Solution
JavaScript relies on brackets to know where function calls start and end. If you miss out a piece of syntax before a function is closed, you’ll encounter the “SyntaxError: missing ) after argument list” error. This guide explores what this…
JavaScript document.getElementByID is not a function Solution
The JavaScript getElementById method selects an element from the HTML Document Object Model (DOM). If you incorrectly spell this method, you’ll encounter the document.getElementByID is not a function error in your program. This tutorial discusses what this error means and…
SyntaxError: Unexpected Tokens in JSON
When working with JSON (JavaScript Object Notation), sometimes you might encounter an error that mentions Unexpected token < in JSON at position 0 or Unexpected token o in JSON at position 1. These are just examples – you might encounter…
Typeerror: Cannot Read Property ‘length’ of Undefined
The .length property in JavaScript has many different use cases. It can be used to: Indicate the number of parameters expected by a function with function.length.Return the number of elements inside of an array with Array.prototype.length.Find out the number of…
Error: Unexpected end of input
Uncaught SyntaxError: Unexpected end of input. I know this very error has kept me up at night sometimes. Don’t sweat it! This article will talk about ways to help you debug your code so you can conquer this error and…
Cannot Read Property ‘addeventlistener’ of Null
The method addEventListener() is used in conjunction with EventTarget, which is a Document Object Model (DOM) implementation that can receive events like click, mouseover, submit, keydown, drag, and more. Events can be thought of as the interaction a user has…
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…
Creating Ranges with JavaScript
A lot of time when writing different functions, we might want to create ranges in order to work with some data. A range represents data in an array or object with a beginning and end value. A lot of languages…
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 Copy Array: A Guide
In JavaScript, copying an array is not as simple as using the assignment operator (=) to create a duplicate. If you've ever tried this, you will be surprised to find out that it only creates a link to the original…
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…