Earn income with your JavaScript skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

JavaScript Introduction

Welcome to our JavaScript Tutorial. This tutorial covers the basics of JavaScript as well as more advanced topics. These include Inheritance, Immediate Functions, Prototypes, Closures, Currying, Namespaces, and more. Upon completion you will be comfortable adding robust JavaScript functionality to your web pages.


Building world-class web apps requires skills that go beyond this tutorial. For that you will need our Dofactory JS which teaches how to write robust, maintainable, and beautiful web apps using proven design patterns and pattern architectures. To learn more click here.

Both this tutorial and our Dofactory JS product come with code samples that demonstrate the concepts in action. Each time you see a 'Run' button, it will execute the code displayed. The results display in an output area under the code.

console.log("I am ready to run!");      // => I am ready to run

Next is a listing of the 17 chapters in this tutorial.

1. JavaScript Intro

The page you are currently reading. Here we provide an overview of the different chapters and their contents.

2. What is JavaScript

In this chapter we review the JavaScript language. You will learn that JavaScript is object-oriented but that it does not support classes. Inheritance is implemented through a mechanism called prototypes. We compare JavaScript to other languages and answer the often asked question: Is JavaScript related to Java? -- let's go

3. JavaScript Essentials

Before you start writing JavaScript code is it important to have a good grasp of the language and its development environment. Here we review language fundamentals, case-sensitivity, commenting, and several important tips and techniques on how to write and debug JavaScript, as well as perform data validation -- let's go

4. JavaScript Variables

JavaScript is not a type-safe language. This can make declaring and using variables a bit tricky. You will learn about global variables, variable scope, variable hoisting, and how the single-var pattern can help you avoid some common pitfalls. -- let's go

5. JavaScript Operators

JavaScript supports all operators that you expect to find in any mature language. However, some JavaScript operators behave in unexpected ways. We will present each of the operators available in JavaScript including arithmetic, assignment, comparison, logical/boolean, and string operators. -- let's go

6. JavaScript Conditionals

In this chapter we show how to use JavaScript conditionals, including if, if else, if else if else and the switch statement. You will also learn how to avoid a common switch coding problem -- let's go

7. JavaScript Loops

In this chapter we present the looping constructs available in JavaScript. These include for loops, do loops, while loops, continue and break. We also discuss for in loops which allow you to iterate over object properties -- let's go

8. JavaScript Built-in Types

JavaScript includes built-in types, such as String, Boolean, Number, Date and Math. Here we discuss how to create these types and how to access their properties. We will show you how to work with implicit and explicit Number to String conversions. Finally, the Date object and the Math object are presented. -- let's go

9. JavaScript Objects

In this chapter we are getting to the very heart of the language. Everything in JavaScript is an object. We discuss object literals followed by object properties and how to dynamically add, retrieve, update, and delete properties from an object. JavaScript is a prototypal language and you will learn how to use this to implement inheritance. -- let's go

10. JavaScript Advanced Objects

JavaScript is object-oriented, but it lacks several features that you've come to expect from a mature object-oriented language. There are ways to solve this with a series of advanced concepts including namespaces, modules, chaining, and closures. You will also learn how to keep members private in objects. -- let's go

11. JavaScript Arrays

Next, you will learn about JavaScript arrays. We show how to create arrays using array literals and some other options. We will also explore ways to effectively iterate over array elements. Multi-dimensional arrays are easily implemented in JavaScript. Finally, you will learn how to give arrays their own methods. -- let's go

12. JavaScript Functions

As a JavaScript developer it is essential that you are comfortable working with functions because they play a critical role in building robust applications. We will discuss function literals and function constructors. You will also learn about variable scope, function closures, and the important immediate functions. -- let's go

13. JavaScript Function Objects

Functions are first-class citizens in JavaScript. They are objects, but better. When programming in JavaScript it is necessary that you move beyond the notion of function being a reusable block of code. Most large-scale JavaScript projects choose functions over objects. We will discuss why this. Also discussed are callbacks, currying, memoization, and the use of functions as building blocks of project modules. -- let's go

14. JavaScript JSON

JSON (JavaScript Object Notation) has taken the world by storm, even in non-JavaScript environments, such as, .NET, Java, Ruby, and PHP. We discuss what JSON is, why it is popular, and how it compares to XML. You will learn how to parse JSON and why Ajax and JSON are a 'match made in heaven'. -- let's go

15. JavaScript Regular Expressions

Regular expressions provide a powerful way to perform pattern matching on certain characters within strings of text. They offer a concise syntax to carry out complex tasks that otherwise would require lengthy code. In this chapter you will learn how to build and apply JavaScript regular expressions in your own solutions -- let's go

16. JavaScript Design Patterns

In this section you will learn how to design powerful applications with JavaScript Design Patterns -- let's go

17. JavaScript Reference

In this final chapter we offer a quick JavaScript reference guide. -- let's go

Last updated on Sep 30, 2023

Earn income with your JavaScript skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.