Friday , 23 June 2017
Home / Tag Archives: methods

Tag Archives: methods

Creating a Hapi Server – Node.js Tutorial for Beginners

Creating a Hapi Server

In this tutorial, we’ll learn about creating a hapi server. We’ll also learn about routing in Hapi and how simple it is to set up a server in seconds. Creating A Server Let’s just get right to it. If you haven’t already, clear out your index.js file and add this bit of code. [crayon-594d4d7997de7225552890/] We’re doing a couple of things …

Read More »

Create a HTTP Web Server – Node.js Tutorial for Beginners

Create a HTTP Web Server

Like I promised, we’ll be creating a VERY simple web blog. Trying to build a fully built web application in Node.js is pretty difficult. So, we’ll be building a simple web app and then learn how to utilize frameworks to help make the process a whole lot smoother. So bare with me here. If things seem hard, then I promise it’ll …

Read More »

HTTP Headers – Advanced JavaScript Tutorial

HTTP headers are just pieces of information of the request and response. Browsers will automatically send this kind of information by default. Sometimes you’ll want to modify these HTTP headers so you can let servers know what to expect. Servers also send you back HTTP headers which allow you to know more information about the response itself. Sending Custom Headers …

Read More »

Audio – Advanced JavaScript Tutorial

Audio

The video and audio objects both have the same events, properties and methods. So, you already know how to use most of things in the audio object. However, there are a couple of key differences when it comes to formats. Audio Tags To add audio into your document, then you use the <audio> tags like so. [crayon-594d4d799b3b7215669275/] Like last time, …

Read More »

Video Events – Advanced JavaScript Tutorial

Video Events

Video events allow you to tap into what’s currently happening with the video. There are a couple of video events, but we’ll only go over the more common ones. Let’s update our <body> tags to this. [crayon-594d4d799bdf1005150224/] We added a button and a place to display the duration and the current time of the video. Let’s update our script to this. …

Read More »

Inheritance – Advanced JavaScript Tutorial

Inheritance

Another advantage to using prototypes is that you can have inheritance in your scripts. What is inheritance? Well, first let me show you and then I’ll explain. Clear your script and add this bit of code. [crayon-594d4d799cbd8591131580/] Alright, let’s break this done. We have 2 objects. One is BankAccount and the other is SavingsAccount. We add a method to the …

Read More »

Prototypes – Advanced JavaScript Tutorial

Prototypes

Prototypes are a must know for any JavaScript developer. As you may know, JavaScript is classless. Instead, it uses prototypes. However, this subject confuses a lot of people.  In this tutorial, we’ll go more in-depth of what prototypes are. First, we’ll learn how to use them and then why you should use them. Clear your script and add this bit …

Read More »

Array Methods – Advanced JavaScript Tutorial

Array Methods

If you’ve seen my beginner JavaScript tutorials, then you already know about arrays. In this tutorial, we’ll discus a couple of handy array methods for iterating through arrays. Iterative Methods As you may know, the for in loop is a great way to loop through all the items in an array. However, arrays come with 5 methods for looping through …

Read More »

Creating Properties and Methods – JavaScript Tutorial

Creating Properties and Methods

In this tutorial, we will be working with the Car class we created in the last tutorial. You’ll learn how to create properties and methods. Creating properties and methods in JavaScript is relatively simple. Creating A Property As previously discussed, a property is just a variable for an object. Creating a property in an object is different than creating a …

Read More »

Date Object – JavaScript Tutorial

Date Object

The date object is a very special object. It allows you to grab the current time and date. It also allows you to manipulate the time and date easily. Let’s take a look at how useful the date object can be. In order to use the date object, you have to store the instance of the object inside a variable. …

Read More »