Summary:👉 TABLE OF CONTENTS:
- Chapter 01: Variables
- Chapter 02: Operators
- Chapter 03: Data Types
- Chapter 04: Functions
- Chapter 05: Global Functions
- Chapter 06: Loops
- Chapter 07: If- else
- Chapter 08: Switch Statement
- Chapter 09: Arrays
- Chapter 10: JSON j
- Chapter 11: Promises
- Chapter 12: Helpful Codes
INTRODUCTION TO BASIC
- Variables are containers for storing data values.
- Uses reserved keyword var to declare a variable.
- Performs some operations on single or multiple operands(data value) and produces a result.
- JavaScript supports the following types of operators.
- Arithmetic Operators
- Logical Operators
- Comparison Operators
- Conditional Operators
- Assignment Operators
- There are two types of Data Types.
- Primitive Data Type
- String
- Boolean
- Number
- Null
- Undefined
- Non-primitive Data Type
- Array
- Object
- Date
- JavaScript function can be defined using the function keyword.
- For loop requires the following 3 parts.
- Initializer - Initialize our counter to a starting value
- condition - Specify a condition that must evaluate to true for the next iteration
- Iteration - increase or decrease the counter
- Only requires condition expression.
- The purpose of a while loop is to execute a statement or code block repeatedly as long as an expression is true.
- Break statement "jumps out" of a loop.
- Continue statement "jumps over" one iteration in the loop.
- The 'If - else' statement is the next form of control statement that allows JavaScript to execute statements in a more controlled way.
- The switch statement is useful when we want to execute one of the multiple code blocks based on the return value of a specified expression.
- An array in JavaScript can be defined and initialized in two ways, Array literal and Array constructor syntax.
- It takes a list of values separated by a comma and enclosed in square brackets.
- Initialize an array with Array constructor syntax using a new keyword.
- JSON - JavaScript Object Notation
- JSON is a syntax for storing and exchanging data.
- JSON is a text format that is completely language-independent.
- Contains both the producing code and calls to the consuming code.
- A Promise may be a proxy for a value not necessarily known when the promise is created. It allows you to associate handlers with an asynchronous action's eventual success value or failure reason.
- A Promise Object can be :
- Pending:: Result - Undefined
- Fulfilled:: Result - a result value
- Rejected:: Result - an error object