Monday , 20 November 2017
Home / Tag Archives: how to (page 5)

Tag Archives: how to

Location Object – Advanced JavaScript Tutorial

Location Object

The location object contains information about the current URL you’re visiting. It can give you helpful information such as the port number, whether or not the site is using SSL and even allows you to redirect the user. Properties Clear your script and add this bit of code. [crayon-5a123c50a3514909664000/] There are a couple of properties of the location object, but …

Read More »

Timing Events – Advanced JavaScript Tutorial

Timing Events

There are 2 kinds of timing events. There’s one with timeouts and another with intervals. Timeouts execute once after a certain amount of time has passed by. Intervals execute repeatedly after a certain amount of time has passed by. Timeouts Clear your script and add this bit of code. [crayon-5a123c50a4e0a856993337/] To create a timeout you use the setTimeout() method. This …

Read More »

Window Object – Advanced JavaScript Tutorial

Window Object

There’s one object to rule them all. That is the global object. Every variable, object and function is part of the global object. The global object can’t be accessed directly. However, most JavaScript host environments create an object that act as the global object. For browsers, this is known as the window object. Let’s take a look at how the …

Read More »

Closures – Advanced JavaScript Tutorial

Closures

Closures allow you to take your JavaScript skills to the next level. Closures are used in almost every JavaScript code you’ve ever seen. You’ve probably ended up using it without knowing it. So, what are closures? A closure is a function inside a function. So, what’s so special about this? Well, you can actually access the variables outside of the …

Read More »

Recursive Functions – Advanced JavaScript Tutorial

Recursive Functions

We’re going to stop talking about object oriented programming for now. Let’s focus on functions. There’s a thing called recursive functions. It’s just a function that calls on itself until a condition has been met. Almost like a loop. Setting Up The Script Clear your script and add this bit of code. [crayon-5a123c50a6bb9443826152/] If you don’t know what factorials are, …

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-5a123c50a718f816364084/] 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 »

Object Oriented Programming – Advanced JavaScript Tutorial

Object Oriented Programming

Object oriented programming in JavaScript is different than most programming languages. JavaScript has no acknowledgement of classes. All properties and methods inside an object are just name-value pairs. We’ve discussed object oriented programming before in the JavaScript beginner tutorial series. Now, we’ll go more in-depth of what OOP is. They way we’ve been writing code is what’s called procedural code. …

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 »

Garbage Collection – Advanced JavaScript Tutorial

Garbage Collection

It’s time to take out the trash! No, not the one in your home. I’m talking about the one in your programs. For every object you create, you take up memory in the visitor’s computer. It isn’t just in some imaginary storage. JavaScript will free up space when you have objects that are no longer in use. This is what’s …

Read More »
ULTIMATE WORDPRESS DEVELOPMENT COURSE
Want to learn how to create your own custom WordPress plugins and themes? Check out my course!
Get 93% off my course. You'll also learn how to integrate WooCommerce and BuddyPress into your projects. This is a limited time offer
Yes, I would like to get 93% off your course!
No Thanks!
close-link