JavaScript Tutorial

Welcome to the JavaScriptTutorial.net website! This JavaScript Tutorial helps you learn the JavaScript programming language from scratch quickly and effectively.

JavaScript Tutorial

If you…

  • Are not sure where to start learning JavaScript.
  • Are frustrated with copy-n-paste JavaScript code from others without really understanding it.
  • Cannot add richer and more compelling features to your websites and web applications using JavaScript because you don’t know how to get much out of the language.

JavaScriptTutorial.net is a good place to start.

Section 1. Getting started

Section 2. Fundamentals

  • Syntax – learn about JavaScript syntax, including case-sensitivity, identifiers, comments, expressions, and statements.
  • Variables –  discuss JavaScript variables and show you various ways to declare the variables in JavaScript.
  • Data types – learn about data types in JavaScript, including primitive and reference types.
  • Number – learn about the Number type.
  • Boolean – introduce you to the Boolean type.

Section 3. Operators

  • Unary operators – learn how to use unary operators that take a single operand and perform an operation.
  • Assignment operators – guide you on how to use assignment operators to assign a value of its right operand to its left operand.
  • Comparison operators – show you how to use comparison operators to compare two values.
  • Logical operators – learn how to use the logical operators: not ( !), and ( &&), and or ( ||).

Section 4. Program flow

  • if…else – learn how to execute a block of code based on a specified condition.
  • Ternary operators – show you how to make a shortcut for the if statement ( ?:)
  • switch – show you how to replace multiple if statements when comparing a value with multiple variants by using the switch statement.
  • while – learn how to perform a pre-test loop that repeatedly executes a block of code as long as a specified condition is true.
  • do…while – show you how to carry a post-test loop that executes a block of code repeatedly until a specified condition is false.
  • for loop – learn how to repeatedly execute a block of code based on various options.
  • break – learn how to prematurely terminate a loop.
  • continue – show you how to skip the current iteration of a loop and jump to the next one.

Section 5. Strings

  • JavaScript strings – learn about the basic strings in JavaScript.
  • String type – introduce you to the String type.
  • trim(), trimStart(), and trimEnd() – remove whitespace characters from a string.
  • padStart() and padEnd() – pad a string with another string until the result string reaches the given length.
  • concat() – concatenate multiple strings into a new string.
  • split() – split a string into an array of substrings.
  • indexOf() – get the index of the first occurrence of a substring in a string.
  • lastIndexOf() – find the index of the last occurrence of a substring in a string.
  • substring() – extract a substring from a string.
  • slice() – extract a part of a string.
  • includes() – check if the string contains a substring.

Section 6. Arrays

  • JavaScript Array – introduce to the Array type in JavaScript.
  • Array length – show you how to use the length property of an array effectively.
  • Stack – implement the stack data structure using the Array’s methods: push() and pop().
  • Queue – implement the queue data structure using the Array’s methods: push() and shift()
  • splice() – manipulate elements in an array such as deleting, inserting, and replacing elements.
  • slice() – copy elements of an array.
  • index() – locate an element in an array.
  • every() – check if every element in an array passes a test.
  • some() – check if at least one element in an array passed a test.
  • sort() – sort elements in an array.
  • filter() – filter elements in an array
  • map() – transform array elements.
  • forEach() – loop through array elements.
  • reduce() – reduce elements of an array to a value.
  • join() – concatenate all elements of an array into a string separated by a seperator.
  • Multidimensional Array – learn how to work with multidimensional arrays in JavaScript.

Section 7. Functions

Section 8. Objects & Prototypes

Section 9. Advanced Functions

Section 10. Error handling

  • try…catch – show you how to handle exceptions using the try...catch statement.

Section 11. Regular Expressions

  • Regular expressions – learn how to create regular expressions in JavaScript and how to use them to search and replace strings using patterns and flags.
  • Character classes – show you how to form a regular expression with character classes that allow you to match any character in the character sets.
  • Anchors – learn how to use anchors in regular expressions to match at the beginning or end of a string.
  • Sets and Ranges – guide you on how to use the sets and ranges to match a set of characters.
  • Word Boundaries – show you how to use the word boundaries in the regular expressions to carry the match whole word only.
  • Quantifiers – learn how to use quantifiers to match a number of instances of a character, group, or character class in a string
  • replace() – replace a substring in a string with a new one.
  • match() – match a string against a regular expression.
  • search() – locate a substring in a string using a regular expression.

Section 12. Network Requests

  • Fetch API – learn how to make asynchronous requests to a remote resource from the web browsers.

Section 13. JavaScript Runtime

  • Execution Contexts – understand execution contexts including global and function execution contexts.
  • Call Stack – understand the call stack.
  • Event Loop – show you how JavaScript handles asynchronous operations using the event loop.
  • Hoisting – learn how hoisting works in JavaScript.
  • Variable scopes – introduce you to the variable scopes.