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 […]


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 […]


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.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 […]

javascript logo

Unit conversion with javascript

This tutorial will demonstrate how to convert units of measurement with the javascript method. The below examples are specific to converting a group of measurements from one unit to another with javascript. For example, if you need to convert a group of distances that were measured in miles to kilometers or a product weighed […]

javascript logo

JavaScript Redirect: How to Redirect a Web Page with JavaScript

You can redirect a web page to another page in a number of ways including server-side redirects, HTML meta refresh redirects and JavaScript redirects. In this tutorial, we will demonstrate how you can easily redirect a page using JavaScript by giving examples for various scenarios. Before we move on to our examples though, let’s briefly […]


5 Examples to Help You Understand How CSS Opacity Works

You can control the transparency of HTML elements on a web page such as text, images or backgrounds with the help of the opacity property in CSS. In this tutorial, we will talk about CSS opacity and we will provide some examples to demonstrate how it works. How CSS Opacity Works The word opaque is […]