Adding Arithmetic & Bitwise operators - JS roadmap (#1878)
* Adding Arithmetic & Bitwise operators * Rectified Typos in the existing filespull/1888/head
parent
b7d2c0b676
commit
939a0ad80e
16 changed files with 45 additions and 16 deletions
@ -1,6 +1,6 @@ |
||||
# Variable Declarations |
||||
|
||||
To use variables in JavaScript, we first need to create it i.e. declare a variable. To declare variables, we use one of the `var`, `let` or `const` keywords. |
||||
To use variables in JavaScript, we first need to create it i.e. declare a variable. To declare variables, we use one of the `var`, `let`, or `const` keywords. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Variables'>Storing the information you need — Variables</BadgeLink> |
||||
|
@ -1 +1,14 @@ |
||||
# Arithmetic operators |
||||
# Arithmetic operators |
||||
|
||||
The Arithmetic operators perform addition, subtraction, multiplication, division, exponentiation, and remainder perations. |
||||
|
||||
Arithmetic operators in JavaScript are as follows: |
||||
- `+` (Addition) |
||||
- `-` (Subtraction) |
||||
- `*` (Multiplication) |
||||
- `/` (Division) |
||||
- `%` (Remainder) |
||||
- `**` (Exponentiation) |
||||
|
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators#arithmetic_operators'>Arithmetic Operators - MDN</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://javascript.info/operators#maths'>Arithmetic Operators - JavaScript.info</BadgeLink> |
||||
|
@ -1 +1,17 @@ |
||||
# Bitwise operators |
||||
# Bitwise operators |
||||
|
||||
Bitwise operators treat arguments as 32-bits (zeros & ones) and work on the level of their binary representation. |
||||
Ex. Decimal number `9` has a binary representation of `1001`. Bitwise operators perform their operations on such binary representations, but they return standard JavaScript numerical values. |
||||
|
||||
Bitwise operators in JavaScript are as follows: |
||||
|
||||
- `&` (AND) |
||||
- `|` (OR) |
||||
- `^` (XOR) |
||||
- `~` (NOT) |
||||
- `<<` (Left SHIFT) |
||||
- `>>` (Right SHIFT) |
||||
- `>>>` (Zero-Fill Right SHIFT) |
||||
|
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#bitwise_operators'>Bitwise Operators - MDN</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://javascript.info/operators#bitwise-operators'>Bitwise Operators - JavaScript.info</BadgeLink> |
@ -1,6 +1,6 @@ |
||||
# Closures |
||||
|
||||
Function closures are one of the most powerful, yet most misunderstood, concepts of JavaScript that are actually really simple to understand. A closure refers to a function along with its lexical environment. It is essentially what allows us to return a function `A`, from another function `B`, that remembers the local variables defined in `B`, even after `B` exits. The idea of closures is employed in nearly every other JavaScript program, hence, it's paramount for a JavaScript developer to know of it really well. |
||||
Function closures are one of the most powerful, yet most misunderstood, concepts of JavaScript that are actually really simple to understand. A closure refers to a function along with its lexical environment. It is essentially what allows us to return a function `A`, from another function `B`, that remembers the local variables defined in `B`, even after `B` exits. The idea of closures is employed in nearly every other JavaScript program, hence, it's paramount for a JavaScript developer to know it really well. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.codeguage.com/courses/js/functions-closures'>JavaScript Closures - The Simplest Explanation</BadgeLink> |
||||
|
Loading…
Reference in new issue