Tuesday , 18 June 2019
Home / Tag Archives: guide (page 8)

Tag Archives: guide

Number Object – JavaScript Tutorial

Number Object

So we’ve talked about objects in general and we discovered a new object called the document object. JavaScript comes with built in objects that you can use. In this tutorial, we take a look at the number object. Number Object Properties Just like other objects, you can access the properties and methods of the number object. Let’s take a look …

Read More »

Objects – JavaScript Tutorial

Objects

Object oriented programming is a topic for intermediate programmers. It can be a very confusing and discouraging topic. JavaScript utilizes objects often so learning about OOP (object oriented programming) early is important. I won’t be going in depth in OOP until later tutorials, but for now, I’ll be covering the basics and what you need to know. What are Objects? …

Read More »

Manipulating Loops – JavaScript Tutorial

Manipulating Loops

There will be a time where you’ll want to break out of a loop early or skip an iteration. Manipulating loops is possible in JavaScript. It’s actually very easy to do with conditional statements. Let’s clear our script and update our code to this. [crayon-5d0913bb2fe17833753372/] Manipulating Loops This is the exact example we used in our while loop tutorial. Let’s …

Read More »

Do While Loop – JavaScript Tutorial

Do While Loop

A do while loop is a special kind of loop. It’s a variation of the while loop, but with a special addition. Let’s learn how to use a do while loop. Creating A Do While Loop Clear your script and update your code to this. [crayon-5d0913bb30698865515186/] You’ll notice everything is the same in our last tutorial, except our loop is …

Read More »

While Loop – JavaScript Tutorial

While Loop

We’ll be continuing with loops by learning about the while loop. The while loop is another way of looping through a block of code while a certain condition is true. Before we get started, let’s talk about iterations for a second Iterations An iteration is the technical term for a process that repeats itself. In the programming world, every time …

Read More »

For Loop – JavaScript Tutorial

For Loop

Loops are essential to know in JavaScript programming. Loops allow you to run the same block of code until it is broken. You could use a function and just call it again and again to run the same block of code, but a loop doesn’t need to be called to run continuously and you can manipulate how many times you …

Read More »

Switch Statements – JavaScript Tutorial

Switch Statements

Switch statements are similar to if statements. They allow you to check if a certain condition is true and then execute a certain block of code accordingly. Let’s take a look at how to create switch statements. Creating Switch Statements Clear your script and add this bit of code. [crayon-5d0913bb317d7483088138/] We have a variable named num and it’s value is …

Read More »

Logical Operators – JavaScript Tutorial

Logical Operators

In this tutorial, we’ll be discussing what logical operators are. Logical operators allow you to define multiple conditions in one conditional statement. Let’s see how to do this. Using Logical Operators Clear your script and add this bit of code. [crayon-5d0913bb32121288278072/] Let’s focus on the if statement here. You’ll notice we have a && also known as a double ampersand. …

Read More »

Conditional Statements – JavaScript Tutorial

Conditional Statements

In this tutorial, we’re going to discuss what conditional statements are. In certain situations, you may want to perform some checks and respond accordingly. Let’s take a look at how to do this. Using Conditional Statements Conditional Statements are pretty easy to use. Clear your script and insert this bit of code. [crayon-5d0913bb32a3b841888627/] Let’s see what happens by opening our …

Read More »

Operators – JavaScript Tutorial

Operators

Operators allow you to tell your script exactly how a piece of data should interact with another piece of data. For example, if you wanted to add 2 pieces of data, then you would use the plus sign ( + ) operator. Here’s how that would look like. [crayon-5d0913bb332fd420041409/] There are many kinds of operators such as math operators, assignment …

Read More »