javascript logo

Using the JavaScript ParseInt Method

JavaScript’s parseInt function is all about converting a string to an integer. The function takes a string value as an argument and converts it to a numerical value with no decimal places, or alternatively the value NaN. ParseInt has a total of two parameters and thus takes two arguments. The second parameter specifies a radix […]

javascript logo

How to Reload a Page in JavaScript?

Refreshing or reloading a web page in JavaScript isn’t all that difficult. There is the straightforward window.location.reload (or just location.reload) method, and then there are a few less intuitive approaches that achieve the same effect. In the this lesson, I’ll show two examples of how to reload a web page using JavaScript. Get ready to get […]

javascript logo

Using the JavaScript Apply Method

Functions are one of JavaScript’s most powerful features. Functions in JavaScript allow programmers to create dynamic input/output systems, code more efficiently, and they allow for management of scope. Next to objects, functions in JavaScript may be the single most important feature of the entire language! Explore JavaScript Courses Functions in JavaScript are special because they […]

photo-1453060113865-968cea1ad53a

Ng-if Examples, Use Cases, and Caveats

Ng-if is a built-in Angular directive for adding and removing content from the DOM. Ng-if is extremely handy for showing and hiding buttons, links, text, images, or other types of content on a page. We covered the differences between ng-show, ng-hide, and ng-if here, so this post will focus specifically on ng-if syntax, examples, and […]

Reactjs

Working with State in React.js

In this tutorial we are going to get up to speed with some basics of React.js which will help us understand how to work with state. State is stored information at a given point in time and it’s common to manipulate state when working with data in an application. React itself is a Javascript library […]

Utah_array_pat5215088

An Array of JavaScript Array Methods

JavaScript Array Methods Table of Contents: Avoiding the Index Prepositional Soup: From In to Of The Joy of Higher Order Functions How Do Your Arrays Stack Up? Pop! It is no real surprise that one of the primary purposes of computer languages is processing lists (indeed, one of the oldest programming languages – Lisp – is […]

angular

angular.bootstrap Explained in 3 Examples

By default, an Angular application is initialized automatically by loading the angular.js script and placing the ng-app directive to the root element of your application (e.g. <html> tag), like the following:

Explore Angular Courses Alternatively, you can also initialize your application manually if you need, using the angular.bootstrap() function. This is especially useful when […]

javascript logo

Insert, Remove, and Replace elements with Array.splice()

When you already have an existing array and need to make some edits, the Array.splice() method comes in handy. The splice() method allows you to INSERT, REMOVE, and REPLACE elements from a javascript array. Before jumping into any examples, let’s start by taking a look at the arguments passed into the splice() method. Array.splice(start_index, number_of_elements_to_remove); […]

javascript logo

Learn JavaScript Basics: Basic Features

Variables Variables are a means for holding on to or pointing to specific values. In JavaScript, variables are declared by using the var keyword and a valid variable name (the var keyword only needs to be used when first declaring a variable). A variable holding a numerical value might look like this:

A variable […]

javascript logo

Learn JavaScript Basics: Overview and Setup

What is this Course? This course is intended to be a beginner’s guide to the JavaScript programming language. It will cover basic features of JavaScript: operators, program flow-control, and loops; the document object model (DOM); as well as events, event listeners, and event functions. This course assumes that the learner has at least some familiarity […]