Sunday , 17 December 2017
Home / Tag Archives: oriented

Tag Archives: oriented

Drawing Images – Advanced JavaScript Tutorial

Drawing Images

If you would like to add your own images into the canvas, then you only have to write a couple lines of code to do so. There are a couple of ways of drawing images onto the canvas, but we’ll be using 1 way which is the image object. Please feel free to download the images I use in this …

Read More »

Event Object – Advanced JavaScript Tutorial

Event Object

The event object is passed into your function whenever an event occurs. This object contains information about the event and even allows you to change how the event phases flow. We’ll be working with our previous example. Update your script to this. [crayon-5a3693bd6f4f2639740452/] Our functions have been updated so that we can reference the event object. The event parameter will …

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

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 »

Converting Data Types – Advanced JavaScript Tutorial

Converting Data Types

As you may know, each value has a data type. Since JavaScript supports dynamic datatypes you can change a value’s data type like so. [crayon-5a3693bd7e2e9852983651/] In some situations, you’ll want to convert the value to another data type instead of just changing the value. JavaScript offers a variety of functions and methods to do so. Let’s set up things to …

Read More »

Prototypes – JavaScript Tutorial

Prototypes

Prototypes in JavaScript can get very complex. There’s a lot to go over. In this tutorial, we’ll only talk about the basics and it’s use for creating methods or properties after the creation of the object. Whenever you drive a car, the amount of mileage goes up. So, let’s create a property that will hold the mileage and create a …

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 »

Creating Objects – JavaScript Tutorial

Creating Objects

Object oriented programming is a style of programming. JavaScript will read your code from top to bottom and execute it in that order. This is what’s called procedural code. Object oriented programming doesn’t work this way. Instead, it’s built on the concept of “objects”. For the most part, object oriented programming is viable for advance or large projects. It helps …

Read More »

Math Object – JavaScript Tutorial

Math Object

The math object is another object you’ll find yourself using often. It allows you to perform advance math operations. It can really save you time and you don’t have to write as much code. Math Object Properties Let’s get started. Clear your script and add this bit of code. [crayon-5a3693bd80ed2913596487/] You do not have to create an instance of the …

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