JavaScript Basics JS Home  <<  JS Basics

In these basic lessons we start by writing a simple 'Hello World' program in JavaScript. Following on from our simplistic 'Hello World' program we look at JavaScript Syntax and the anatomy of the language. We then examine the various ways we can insert JavaScript into our HTML. After this we look at basic maths functions creating variables using the var statement. After this we take our first look at some of JavaScript's predefined objects by looking at the Object and String objects and some of the methods associated with them. We finish the basics section by examining booleans and the Boolean object.

Lesson  1: Getting Started

In this lesson we create the ubiquitous 'Hello World' program using JavaScript to get us started on our journey into the wonderful world of JavaScript programming. This will introduce us to the look of some basic JavaScript code and lead nicely into the following lessons in the basics section.

Lesson  2: JavaScript Syntax

This lesson covers syntax and how we use it to create our JavaScript programs. JavaScript is an interpreted language and so there is no reason to compile our code before we run it. This leads to faster development of software but the downside is slower runtimes than compiled languages.

Lesson  3: The Anatomy Of JavaScript

In this lesson we look at the anatomy of JavaScript by showing all the parts that make up the JavaScript language.

Lesson  4: Applying JavaScript

In this lesson we learn how to apply JavaScript into our web pages and look at the various ways to do this. We can do this inline within the markup or via internal/external scripts that reside within the <head> </head> or <body> </body> HTML element of a page. We will discuss each way of inserting script in turn whilst explaining best practice.

Lesson  5: Basic Maths Functions

Basic mathematical operations are supported in JavaScript using symbols. In this lesson we look at some of the basic maths and assignment operators.

Lesson  6: Variables

So what is a variable? Well a variable allows us to store some information that we may want to manipulate or use later. The variable is like a container where we put our information for later retrieval. In JavaScript you create a variable using the keyword var, followed by the name you wish to identify the variable by. Learn how to in this lesson.

Lesson  7: Objects

What are objects, how are they are created and what we can do with them? In this lesson we learn how to create our own Object instances and assign property values to them. We also look at the delete special operator which allows us to delete object properties.

Lesson  8: Strings

Strings are created using the global String constructor or created as string primitives. String literals are string primitives and are created by enclosing some value in single or double quotes. In this lesson we look at string usage and some of the String methods available.

Lesson  9: Booleans

This lesson is all about booleans and how to use them.


Related Tutorials

JavaScript Intermediate - The Intermediate Lessons.
JavaScript Advanced - The Advanced Lessons.