JavaScript Tutorial
Welcome to the JavaScriptTutorial.net website! This JavaScript Tutorial helps you learn the JavaScript programming language from scratch quickly and effectively.
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
- What is JavaScript? – introduce you to JavaScript and its history.
- Install a JavaScript source code editor – learn how to install the Visual Studio Code for editing JavaScript code.
- Meet the Console Tab of Web Development Tools – provide you with a basic introduction to the Console window on the web browsers.
- JavaScript Hello World – learn how to execute the first JavaScript code that displays the famous
"Hello, World!"
message.
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 theswitch
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()
andpop()
. - Queue – implement the queue data structure using the Array’s methods:
push()
andshift()
- 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
- Functions – introduce you to functions in JavaScript.
- Functions are the first-class citizens – learn how to store functions in the variables, pass functions into other functions as arguments, and return functions as values.
- Anonymous Functions – learn about anonymous functions which are the functions without names.
- Immediately Invoked Function Expression (IIFE) – learn about immediately invoked function expressions (IIFE).
- Callback functions – introduce you to the callback functions and learn how to use the callbacks to handle asynchronous operations.
Section 8. Objects & Prototypes
- Objects – introduce to JavaScript objects.
- Object Properties – dive into the object’s properties and their attributes.
- Constructor functions – show you how to use constructor functions to define custom types in JavaScript.
- JavaScript Prototype – learn how the prototype works in JavaScript.
- constructor/prototype pattern – show you how to combine the constructor function and prototype pattern to define custom types.
- Prototypal inheritance – understand prototypal inheritance in JavaScript.
- What is this in JavaScript – understand the
this
value and how it works in JavaScript. - Factory functions – learn about the factory functions which are functions that return objects.
- for…in loop – learn how to iterate over properties of an object using the
for...in
loop. - Enumerable Properties – learn more about the enumerable properties.
- Own Properties – understand the own and inherited properties.
- Primitive vs. Reference values – understand the differences between primitive and reference values.
- Primitive wrapper types – learn how primitive wrapper types work in JavaScript.
Section 9. Advanced Functions
- Passing by value – understand how pass-by-value works in JavaScript.
- Returning multiple values – guide you on how to return multiple values from a function.
- Function type – introduce you to the
Function
type and its properties and methods. - The call() method – understand the
call()
method and learn how to use it effectively. - The apply() method – learn how to use the
apply()
method effectively. - The bind() method – understand the
bind()
method and how to apply it effectively. - Recursive function – learn how to develop recursive functions.
- Closures – understand the closures in JavaScript.
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.
0 Comments