Functions. Part 1

This is the first part in the series of functions. These tutorials will help to deal with functions declaration, scoping, parameters, default values and methods.

Variable-length parameter lists

Consider the following sumItUp function and the call to it:

function sumItUp() {
    var sum = 0;
    return sum;
sumItUp(1, 2, 3, 4 …
➟ Read more

Objects Revisited

This section serves as a review of Objects in JavaScript, and visualizing their structure.

At their core, JavaScript objects are very simple. They are basically a container that hold zero or more key-value pairs.

The simplest object is this one:

var serverInfo = {};

Here the variable named serverInfo contains an object …

➟ Read more


The notes for this tutorial do not contain many notes. See the source code for the different array operations.

The person.js source file

 * Simple Person class.
 * Represents a person with name and age.
function Person(name, age) {
    this.age = age; = name;
    this.toString = function() {
        return …
➟ Read more

CSS Debugging

This is a recap of a recent tutorial about CSS and the Chrome Inspector at my company.

We showed the Chrome Inspector's "Elements" tab to inspect CSS styles for selected tags on the page.

The following screenshots illustrate a few features of the inspector

One option: inspect higher-level elements

Let's …

➟ Read more

Event handling with jQuery

The following example uses jQuery to handle browser events. The event-handling can be done with raw DOM objects, but jQuery provides a nice interface for dealing with the DOM. Also, some browsers have different DOM object implementation and behavior. jQuery takes care of any differences between browsers and versions and …

➟ Read more