This post is part 17 of 92 in the series Programming by Stealth

At this stage in the series we have made very good progress towards understanding the core JavaScript language. However, there is still one very important piece missing – objects. We have mentioned them in passing in almost every instalment, and each time, we put them off until later. We finally remedy that in this instalment.

Read more

Tagged with:

This post is part 16 of 92 in the series Programming by Stealth

In the previous instalment we introduced the concept of JavaScript functions. We learned how to all existing functions, and how to create out own.

In this instalment we’re going to take our understanding of functions to the next level. The techniques we encounter today would be considered advanced techniques in most other languages, and you could spend years developing in Java and never encounter an anonymous function. However, because of how JavaScript is integrated into HTML documents, these techniques are considered fundamental in JavaScript, and anonymous functions are a dime a dozen!

Before we delve into anonymous functions, we’ll start by taking a deeper look at how JavaScript deals with function arguments.

Read more

Tagged with:

This post is part 15 of 92 in the series Programming by Stealth

At this stage we’ve learned about five key components to any programming language, and how they are implemented in JavaScript – variables, operators, branching, arrays, and loops. Now it’s time to add another – functions.

A function is a collection of statements that is given a name so it can be easily re-used. We’ve already used functions, but without knowing that’s what we’ve been doing.

Read more

Tagged with:

This post is part 14 of 92 in the series Programming by Stealth

At this stage we’ve learned about three of the key components common to just about every programming language, and how they’re implemented in JavaScript – variables, operators, and branching. Now it’s time to add two more – arrays, and loops.

Arrays store a list of related data in a single variable, and loops allow us to apply the same action over and over again. To process an arbitrarily long array, you need some kind of iteration, and loops are the simplest way of achieving that.

Read more

Tagged with:

This post is part 13 of 92 in the series Programming by Stealth

In the previous instalment we got our first taste of JavaScript. We learned about variables, literal data types, and some basic string and arithmetic operators. In this instalment we’re going to focus on booleans. We’ll look at how non-boolean values get converted to booleans when needed (e.g. is 'boogers' true or false?), we’ll learn about some comparison operators that result in boolean values, and we’ll learn about some logical operators. At that stage we’ll have all the knowledge we need to learn about our third fundamental programming concept – branching.

Read more

Tagged with:

This post is part 12 of 92 in the series Programming by Stealth

With this instalment we’re starting into a whole new phase of the series. We’ve looked at using HTML to define the structure of an HTML document, and then we moved on to looking at CSS for defining the look of an HTML document, and now we’re going to move on to JavaScript to add interactivity to HTML documents.

Learning the basics of JavaScript, and learning how to connect JavaScript into the browser environment are two very different tasks, so, we’re going to separate them. We’ll start by learning some JavaScript fundamentals in a JavaScript playground I’ve created. Only when we know enough JavaScript for the mechanics of the browser’s JavaScript integration to make sense will we move tackle the so-called DOM, and the browser event model.

Read more

Tagged with:

This post is part 11 of 92 in the series Programming by Stealth

Finally, after many months of making Allison wait, it’s time to look at tables on web pages. We’ll start by describing the HTML markup for tables, and then look at how to style them with CSS.

Remember – tables are for one thing, and one thing only – displaying tabular data!

Read more

Tagged with:

This post is part 10 of 92 in the series Programming by Stealth

Continuing our look at CSS, in this instalment we’ll start by looking at how to style lists, then we’ll move on to look at some more CSS selectors, and we’ll finish with an introduction to a new CSS concept – pseudo-classes.

Read more

Tagged with:

This post is part 9 of 92 in the series Programming by Stealth

In the previous instalment we learned how to group multiple HTML tags together to define regions within a page, and then how to move those regions around by floating them, or positioning them explicitly. We’ll start this instalment with a little revision – there was a lot to digest last time! While re-visiting the layout from last time, we’ll also look at some of its limitations, and then we’ll move on to look at the CSS display property, how it can be used to alter layouts, and, how we can use it to improve on our demo layout.

Read more

Tagged with:

This post is part 8 of 92 in the series Programming by Stealth

In the previous instalment we learned about the CSS box model. Each HTML tag is represented as a box within the browser, and those boxes stack down the page, and inside each other to build up the web pages we see. We also learned how to use FireFox’s developer tools to actually see and inspect the boxes. In this instalment we’ll learn how to take one or more boxes out of the normal flow of the page, and position them elsewhere on the page.

Read more

Tagged with:

« go backkeep looking »