javascript

Iterating Through Javascript Arrays

Iterating (In the simplest terms) means to go through each item in a group of items.
An array is a group of items, so to iterate through an array means to do something with the items in an array (But not necessarily all of them)

Everything you learn here is likely to be applicable to any other programming language you learn, arrays in one language behave pretty much the same in every other language.

Basic Javascript Data Validation

Data Validation With Javascript:

Data validation is the process of ensuring that data (Normally entered into a form of some kind) is in the same format as you want and expect it to be in.
For example, if you ask someone to type in their birth month and you want them to use the textual label for the month rather than the numerical representation (i.e "February" rather than "2" or "02") then using datavalidation you should test that the end user is typing in the textual label for the month.

Getting Started With The Google Maps API

The google maps api is great, there's a lot you can do with it and even with the simplest of creations give your website look quite professional.

For example, you may have a map of your businesses location on a static map as an image.
I don't care how fancy you've made the image look, using the google amps api will make it look better.

In this article I'll go over a quick example of how to set up a very basic google map to put on your website.

How To Execute Javascript When the Document Is Ready

The old method of loading javascript code and functions on page load was the following:

window.onload = function ()
{
Javascript code goes here
}

This is all well and good and appears to do exactly what you want it to, however it's certainly not perfect.

Hello World - Javascript

Learning how to create a 'hello world' script is normally the first step in learning any programming language.
It's important because it's simple, and it willbe difficult for you to advance to the more advanced javascript features without mastering the basics.

What we're going to do is very simple, we're simply going to insert the text "Hello World" somewhere in an html document.

First we want to create an empty script tag that we will use to store our javascript code:

Syndicate content