If you are…
Section 1. Getting started
varkeyword. This tutorial also covers the scoping and hoisting of variables.
Section 3. Program flow
- The if-else statement – shows you how to to use the
if-elsestatement to execute a block of code if a condition is true.
- The switch case statement – introduces you to the
switchstatement which is a better and cleaner way to write a complex if-else statement chains.
- The while loop – shows you how to execute a block of code repeatedly based on a specified condition.
- The do-while loop – provides you with an alternative way to execute a block of code repeatedly with the condition checked at the end of each loop iteration.
- The for loop – introduces you how to execute a block of code in a specified number of times.
- The break statement – learns how to terminate a loop e.g., for, while,or do-while immediately and transfer control of the program to the statement following the loop statement.
- The continue statement – shows you how to use the
continuestatement to terminate the execution of the iteration in the current loop and continue the next loop iteration.
Section 4. Arrays
pop()methods of the
shift()methods of the
- Array splice(): insert, delete, and replace – shows you how to insert, delete, and replace elements in an array using the
- Array indexOf(): finding elements – guides you how to use the
lastIndexOf()methods to find the position of an element in an array.
- Array sort(): sorting array elements– gives you many examples of sorting arrays of numbers, strings, objects, etc.
filter()method to filter elements in an array based on a test function.
- Array map(): transforming array elements – shows you how to use the
map()method to transform elements in an array and return a new array that includes the results.
- Array forEach(): executing a function on every element – illustrates how to use the
forEach()method to execute a function on every element in an array.
- Array reduce() and reduceRight(): reducing an array into a value – shows you how to use the
reduceRight()methods to reduce an array into a value.
Section 5. Functions
Functiontype that has properties and methods as other objects. This tutorial illustrates how you can use functions as objects.
thiskeyword in various contexts.