Using Skeleton for YouTube Videos

Neal Koss

WHAT'S AN API?

An application programming interface (API) is a specification intended to be used as an interface by software components to communicate with each other. An API may include specifications for routines, data structures, object classes and variables.

$(document).ready(function() {
    $.getJSON('https://graph.facebook.com/zombies', function(fbresults) {
        document.write(fbResults.name);
    });
});

INTRO to jQUERY's .getJSON() FUNCTION

A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (much as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.

$(document).ready(function() {
    $.getJSON('https://graph.facebook.com/zombies', function(fbresults) {
        document.write(fbResults.name);
    });
});

ADDING DATA to ARRAYS

In computer science, an array type is a data type that is meant to describe a collection of elements (values or variables), each selected by one or more indices (identifying keys) that can be computed at run time by the program. Such a collection is usually called an array variable, array value, or simply array.

var myArray = [];
myArray[0] = 'January';
myArray[1] = 'February';
myArray[5] = 'March';

DECLARING a FUNCTION in JAVASCRIPT

In computer science, a subroutine, also termed procedure, function, routine, method or subprogram, is a part of source code within a larger computer program that performs a specific task and is relatively independent of the remain ing code.

function matingCall(you, me) {
	alert("Hello " + you + ", is it me you are looking for?");
	alert("NO, " + me + "!");
}

INTRO to (INDEXED) ARRAYS

frameborder="

Indexed arrays store a series of one or more values organized such that each value can be accessed using an unsigned integer value. The first index is always the number 0, and the index increments by 1 for each subsequent element added to the array.

var myArray = [];
myArray[0] = 'January';
myArray[1] = 'February';
myArray[5] = 'March';

STRING VARIABLES to HTML ELEMENTS

By using judicious combinations and concatenations of strings, both variable and literal, HTML statements can be created dynamically and entered into the structure of the web page using the 'document.write()' construct.

var myName="Neal Koss";
document.write("<h1>" + myName + "</h1>";