This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

JavaScript Fundamentals Course

JavaScript icon
  • JavaScript is the world's most popular programming language.
  • JavaScript is the programming language of the Web.

Module 1. Introduction

Module 2. Variables, Operators and Assignment

Prerequisites: Module 1. Introduction

Module 3. Data Types, Functions, Objects and Events

Prerequisites: Module 2. Variables, Operators and Assignment

  • 3.1 JS Data Types JavaScript variables can hold many data types: numbers, strings, objects and more:
  • 3.2 JS Functions A JavaScript function is a block of code designed to perform a particular task.
  • 3.3 JS Objects A car has properties like weight and color, and methods like start and stop
  • 3.4 JS Events HTML events are "things" that happen to HTML elements.

Module 4. Data Types

Prerequisites: Module 3. Data Types, Functions, Objects and Events

  • 4.1 JS Strings JavaScript strings are used for storing and manipulating text. A JavaScript string is zero or more characters written inside quotes.
    • 4.1.1 JS String Methods Primitive values, like "John Doe", cannot have properties or methods (because they are not objects). But with JavaScript, methods and properties are also available to primitive values, because JavaScript treats primitive values as objects when executing methods and properties.
    • 4.1.2 JS String Search The indexOf() method returns the index (position) the first occurrence of a string in a string
    • 4.1.3 JS String Templates Template Literals use back-ticks (``) rather than the quotes ("") to define a string:
  • 4.2 JS Numbers JavaScript has only one type of number. Numbers can be written with or without decimals.
  • 4.3 JS Arrays JavaScript arrays are used to store multiple values in a single variable.

Module 5. Dates, Math and Random

Prerequisites: Module 4. Data Types

  • 5.1 JS Dates JavaScript Date Object lets us work with dates:
  • 5.2 JS Math The JavaScript Math object allows you to perform mathematical tasks on numbers.
  • 5.3 JS Random Math.random() returns a random number between 0 (inclusive), and 1 (exclusive):

Module 6. Logic, Conditions and Loops

Prerequisites: Module 5. Dates, Math and Random

  • 6.1 JS Booleans A JavaScript Boolean represents one of two values: true or false.
  • 6.2 JS Comparisons Comparison and Logical operators are used to test for true or false.
  • 6.3 JS Conditions Conditional statements are used to perform different actions based on different conditions.
  • 6.4 JS Switch The switch statement is used to perform different actions based on different conditions.
  • 6.5 JS For Loops Loops can execute a block of code a number of times.
  • 6.6 JS While Loops Loops can execute a block of code as long as a specified condition is true.
  • 6.7 JS Break Loops The break statement "jumps out" of a loop.

Module 7. Miscellaneous

Prerequisites: Module 6. Logic, Conditions and Loops

  • 7.1 JS Sets A Map holds key-value pairs where the keys can be any datatype. A Map remembers the original insertion order of the keys.
  • 7.2 JS Maps A Map holds key-value pairs where the keys can be any datatype.
  • 7.3 JS Typeof In JavaScript there are 5 different data types that can contain values
  • 7.4 JS Type Conversion JavaScript variables can be converted to a new variable and another data type:
  • 7.5 JS Bitwise JavaScript stores numbers as 64 bits floating point numbers, but all bitwise operations are performed on 32 bits binary numbers
  • 7.6 JS RegExp A regular expression is a sequence of characters that forms a search pattern. The search pattern can be used for text search and text replace operations.
  • 7.7 JS Precedence Operator precedence describes the order in which operations are performed in an arithmetic expression. Multiplication (*) and division (/) have higher precedence than addition (+) and subtraction (-).
  • 7.8 JS Errors When executing JavaScript code, different errors can occur.
  • 7.9 JS Scope Scope determines the accessibility (visibility) of variables.
  • 7.10 JS Hoisting Hoisting is JavaScript's default behavior of moving declarations to the top.
  • 7.11 JS Strict Mode use strict"; Defines that JavaScript code should be executed in "strict mode".
  • 7.12 JS this Keyword In JavaScript, the this keyword refers to an object.
  • 7.13 JS Arrow Function Arrow functions were introduced in ES6. Arrow functions allow us to write shorter function syntax

Module 8. JavaScript Classes & Advanced Topics

Prerequisites: Module 7. Miscellaneous

  • 8.1 JS Classes ECMAScript 2015, also known as ES6, introduced JavaScript Classes. JavaScript Classes are templates for JavaScript Objects.
  • 8.2 JS Modules JavaScript modules allow you to break up your code into separate files. This makes it easier to maintain a code-base.
  • 8.3 JS JSON JSON is a format for storing and transporting data. JSON is often used when data is sent from a server to a web page.
  • 8.4 JS Debugging Errors can (will) happen, every time you write some new computer code.
  • 8.5 JS Style Guide Always use the same coding conventions for all your JavaScript projects.
  • 8.6 JS Best Practices Avoid global variables, avoid new, avoid ==, avoid eval()
  • 8.7 JS Mistakes This chapter points out some common JavaScript mistakes.
  • 8.8 JS Performance How to speed up your JavaScript code.
  • 8.9 JS Reserved Words In JavaScript you cannot use these reserved words as variables, labels, or function names:

Module 9. JS Versions

Prerequisites: Module 8. Classes and More

  • 9.1 JS Versions JavaScript was invented by Brendan Eich in 1995, and became an ECMA standard in 1997. ECMAScript is the official name of the language.
  • 9.2 JS 2009 (ES5) ECMAScript 2009, also known as ES5, was the first major revision to JavaScript. This chapter describes the most important features of ES5.
  • 9.3 JS 2015 (ES6) ECMAScript 6, also known as ES6 and ECMAScript 2015, was the second major revision to JavaScript. This chapter describes the most important features of ES6.
  • 9.4 JS 2016 The JavaScript naming convention started with ES1, ES2, ES3, ES5 and ES6. But, ECMAScript 2016 and 2017 was not called ES7 and ES8.
  • 9.5 JS 2017 Since 2016 new versions are named by year (ECMAScript 2016, ECMAScript 2017).
  • 9.6 JS 2018 New Features in ECMAScript 2018
  • 9.7 JS 2019 New Features in ES2019
  • 9.8 JS 2020 New Features in ES2020
  • 9.9 JS 2021/2022 New Features in ES2021/2022
  • 9.10 JS IE / Edge Internet Explorer Retirement Dates:
  • 9.11 JS Versions History JavaScript was invented by Brendan Eich in 1995. It was developed for Netscape 2, and became the ECMA-262 standard in 1997.

Module 10. JS Objects

Prerequisites: Module 8. Classes and More

Module 11. JS Functions

Prerequisites: Module 8. Classes and More

Module 12. JS Classes

Prerequisites: Module 8. Classes and More

  • 12.1 JS Class Intro ECMAScript 2015, also known as ES6, introduced JavaScript Classes. JavaScript Classes are templates for JavaScript Objects.
  • 12.2 JS Class Inheritance To create a class inheritance, use the extends keyword. A class created with a class inheritance inherits all the methods from another class
  • 12.3 JS Class Static Static class methods are defined on the class itself. You cannot call a static method on an object, only on an object class.

Module 13. JS Async

Prerequisites: Module 8. Classes and More

  • 13.1 JS CallbacksA callback is a function passed as an argument to another function
  • 13.2 JS Asynchronous Functions running in parallel with other functions are called asynchronous
  • 13.3 JS Promises "Producing code" is code that can take some time. "Consuming code" is code that must wait for the result. A Promise is a JavaScript object that links producing code and consuming code.
  • 13.4 JS Async/Await async and await make promises easier to write

Module 14. JS HTML DOM

Prerequisites: Module 8. Classes and More

Module 15. JS Browser BOM

Prerequisites: Module 8. Classes and More

  • 15.1 JS Window The Browser Object Model (BOM) allows JavaScript to "talk to" the browser.
  • 15.2 JS Screen The window.screen object contains information about the user's screen.
  • 15.3 JS Location The window.location object can be used to get the current page address (URL) and to redirect the browser to a new page.
  • 15.4 JS History The window.history object contains the browsers history.
  • 15.5 JS Navigator The window.navigator object contains information about the visitor's browser.
  • 15.6 JS Popup Alert JavaScript has three kind of popup boxes: Alert box, Confirm box, and Prompt box.
  • 15.7 JS Timing JavaScript can be executed in time-intervals. This is called timing events.
  • 15.8 JS Cookies Cookies let you store user information in web pages.

Module 16. JS Web APIs

Prerequisites: Module 8. Classes and More

  • 16.1 Web API Intro API stands for Application Programming Interface. A Web API is an application programming interface for the Web.
  • 16.2 Web Forms API Validate form data being submitted by user
  • 16.3 Web History API The Web History API provides easy methods to access the windows.history object.
  • 16.4 Web Storage API The Web Storage API is a simple syntax for storing and retrieving data in the browser. It is very easy to use:
  • 16.5 Web Worker API A web worker is a JavaScript running in the background, without affecting the performance of the page.
  • 16.6 Web Fetch API The Fetch API interface allows web browser to make HTTP requests to web servers.
  • 16.7 Web Geolocation API The HTML Geolocation API is used to get the geographical position of a user.

Module 17. JS AJAX

Prerequisites: Module 8. Classes and More

Module 18. JS JSON

Prerequisites: Module 8. Classes and More

  • 18.1 JSON Intro JSON stands for JavaScript Object Notation
  • 18.2 JSON Syntax The JSON syntax is a subset of the JavaScript syntax.
  • 18.3 JSON vs XML The following JSON and XML examples both define an employees object, with an array of 3 employees:
  • 18.4 JSON Data Types In JSON, values must be one of the following data types:
  • 18.5 JSON Parse A common use of JSON is to exchange data to/from a web server.
  • 18.6 JSON Stringify A common use of JSON is to exchange data to/from a web server.
  • 18.7 JSON Objects Inside the JSON string there is a JSON object literal:
  • 18.8 JSON Arrays Inside the JSON string there is a JSON array literal:
  • 18.9 JSON Server A common use of JSON is to exchange data to/from a web server.
  • 18.10 JSON PHP This chapter will teach you how to exchange JSON data between the client and a PHP server.
  • 18.11 JSON HTML JavaScript can be used to make HTML in your web pages.
  • 18.12 JSON JSONP JSONP is a method for sending JSON data without worrying about cross-domain issues.

Module 19. JS vs jQuery

Prerequisites: Module 8. Classes and More

  • 19.1 jQuery Selectors Was designed to handle Browser Incompatibilities and to simplify HTML DOM Manipulation, Event Handling, Animations, and Ajax. Finding HTML Element by Id, Tag Name, Class Name or CSS Selectors
  • 19.2 jQuery HTML For more than 10 years, jQuery has been the most popular JavaScript library in the world. Set Text Content, Get Text Content, Set HTML Content and Get HTML Content
  • 19.3 jQuery CSS Hide, show or style an HTML Element
  • 19.4 jQuery DOM Remove an HTML element, Return the parent of an HTML element
JavaScript Quiz
Credits

JavaScript icons used throughout the site are provided by ICONS8.COM. The smartphone icon used throughout the site are Smartphone icons created by Freepik - Flaticon