1. Data Types
The first six data types are primitive, and Objects are derived data types.
- String – represents a sequence of characters e.g. “hello”
- Number – represents numeric values e.g. 100
- Boolean – represents boolean value either false or true
- Null – represents null i.e. no value at all
- Undefined – represents an undefined value
- Symbol – A “symbol” represents a unique identifier
2. Basic Vocabulary
- Variable: Any named reference to a given value is known as a variable.
- Keyword / reserved word: Any word that forms the vocabulary of a programming language is called a keyword or a reserved word.
- Operator: Operators are reserved words or mathematical symbols that perform an action on values and variables. Examples: +, – ,= ,*, , ===, typeof ,!= and so on
- Statement: A group of words, numbers or operators that perform a specific task is known as a statement. var b = q
A function is a block of code grouped as a separate section. This block of code is executed only when the function is explicitly called. Functions allow users to organise codes into sections and enables code reusability.
A function is operated by two steps:
- Declaring/defining a function.
- Making functions calls when required.
Image Source: Programiz
5. Variables and their scope
There are two rules that align the scope of a variable:
- Variables declared in the outer scope can be accessed by the inner loop. While the variables declared in the nested loop cannot be accessed by the outer scope.
- Variables are taken up from the specific lexical environment.
Image Source: medium
Image Source: National School Of Opening Schooling
- Operator Precedence: If there is more than one operator in an expression, the order in which they will be executed is determined by the “Operator Precedence”. Operators with higher precedence are executed first.
- Operator Associativity: If two or more operators have the same precedence, then the “Associativity” table tells us about the direction in which the code will be parsed.
8. Truthy and Falsy
Image Source: Slide Share
9. Creating Variables
- Variables declared with var type are in the scope of function, they can be used as Global variables, only if declared so.
- let variables are limited to block scope only.
- const variables are let variables whose values can’t be assigned.
Image Source: constletvar.com
10. Looping Events
Image Source: Medium
A web browser is a high computing piece of software that comes with abundant components. These components assist web developers to create complex web-based applications. To maintain security, web developers are restricted to use some of these components.
For example, A web developer is allowed to keep a track of a user’s location but he/she can’t save their login credentials.
Image Source: developers.google
12. DOM – Document Object Model
Image Source: Guru99.com
13. Auto-Inherited Properties
14. Built-In Objects
There are a bunch of in-built objects that make coding easy. The Date and Math objects find a wide application on a regular basis.
- Math.sqrt(36) // 6
- Math.min(7, 4, 6) // 4
- Math.max(7, 4, 6) // 7
An object that provides a useful construct while working with asynchronous tasks is known as a promise. It is known as a “Promise”, as it ensures that it will run during successful execution or failure of a specific task.
For working with a promise you need to:
- Create a promise
- Use a promise
Frequently Asked Questions
1.Go to settings and click on the “Internet Options” window.
2. From it select the Security tab.
3. On the “Security” tab, make sure that you select the Internet Zone.
4. Click on the “Custom level.” button.
5. Then go to Security Settings.
6. The Internet Zone dialog box appears.
7. Enable for Active Scripting from the Scripting section.
1. Open Google Chrome on the target computer.
2. On the top right corner, click More option and then select Settings.
3. Click on Privacy and Security.
4. Select Site Settings.
6. Turn on ALLOWED.
You can’t write codes or create projects using any programming language unless you are familiar with its building blocks. Although, the basic structure of all the programming language is the same yet the syntax varies highly. That’s why first learn about the syntax by writing elementary codes and then use the language for writing codes or creating projects.
By Vanshika Singolia