Adding Arithmetic & Bitwise operators - JS roadmap (#1878)

* Adding Arithmetic & Bitwise operators

* Rectified Typos in the existing files
pull/1888/head
Nisarg-Chokshi 2 years ago committed by GitHub
parent b7d2c0b676
commit 939a0ad80e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/roadmaps/106-javascript/content/100-javascript-introduction/101-history-of-javascript.md
  2. 2
      content/roadmaps/106-javascript/content/100-javascript-introduction/103-how-to-run-javascript.md
  3. 2
      content/roadmaps/106-javascript/content/101-javascript-variables/100-variable-declarations/readme.md
  4. 2
      content/roadmaps/106-javascript/content/101-javascript-variables/101-hoisting.md
  5. 2
      content/roadmaps/106-javascript/content/101-javascript-variables/readme.md
  6. 2
      content/roadmaps/106-javascript/content/102-javascript-datatypes/101-object/100-prototype.md
  7. 2
      content/roadmaps/106-javascript/content/104-javascript-data-structures/100-indexed-collections/100-arrays.md
  8. 2
      content/roadmaps/106-javascript/content/106-javascript-loops-iterations/103-for-statement.md
  9. 15
      content/roadmaps/106-javascript/content/108-javascript-expressions-and-operators/102-arithmetic-operators.md
  10. 18
      content/roadmaps/106-javascript/content/108-javascript-expressions-and-operators/103-bitwise-operators.md
  11. 2
      content/roadmaps/106-javascript/content/109-javascript-functions/105-scope-and-function-stack/100-recursion.md
  12. 2
      content/roadmaps/106-javascript/content/109-javascript-functions/105-scope-and-function-stack/101-lexical-scoping.md
  13. 2
      content/roadmaps/106-javascript/content/109-javascript-functions/105-scope-and-function-stack/102-closures.md
  14. 2
      content/roadmaps/106-javascript/content/111-javascript-this-keyword/readme.md
  15. 2
      content/roadmaps/106-javascript/content/112-javascript-asynchronous-javascript/104-promises/readme.md
  16. 2
      content/roadmaps/106-javascript/content/114-javascript-iterators-and-generators.md

@ -1,6 +1,6 @@
# History of JavaScript
JavaScript was initially created by Brendan Eich of NetScape and was first announced in a press release by Netscape in 1995. It has a bizarre history of naming; initally it was named Mocha by the creator, which was later renamed to LiveScript. In 1996, about a year later after the release, NetScape decided to rename it to be JavaScript with hopes of capitalizing on the Java community (although JavaScript did not have any relationship with Java) and released Netscape 2.0 with the official support of JavaScript.
JavaScript was initially created by Brendan Eich of NetScape and was first announced in a press release by Netscape in 1995. It has a bizarre history of naming; initially, it was named Mocha by the creator, which was later renamed LiveScript. In 1996, about a year later after the release, NetScape decided to rename it to JavaScript with hopes of capitalizing on the Java community (although JavaScript did not have any relationship with Java) and released Netscape 2.0 with the official support of JavaScript.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://roadmap.sh/guides/history-of-javascript'>Brief History of JavaScript</BadgeLink>

@ -1,6 +1,6 @@
# How to run Javascript
JavaScript can be run in the browser by including the external script file using the `script` tag, write it within the HTML page using the `script` tag again, run it in the browser console or you can also use [REPL](https://www.digitalocean.com/community/tutorials/how-to-use-the-node-js-repl).
JavaScript can be run in the browser by including the external script file using the `script` tag, writing it within the HTML page using the `script` tag again, running it in the browser console or you can also use [REPL](https://www.digitalocean.com/community/tutorials/how-to-use-the-node-js-repl).
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.digitalocean.com/community/tutorials/how-to-add-javascript-to-html'>How To Add JavaScript to HTML</BadgeLink>

@ -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,6 +1,6 @@
# Hoisting
JavaScript Hoisting refers to the process whereby the interpreter appears to move the declaration of functions, variables or classes to the top of their scope, prior to execution of the code.
JavaScript Hoisting refers to the process whereby the interpreter appears to move the declaration of functions, variables, or classes to the top of their scope, prior to execution of the code.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://developer.mozilla.org/en-US/docs/Glossary/Hoisting'>What is Hoisting - MDN Docs</BadgeLink>

@ -1,6 +1,6 @@
# Javascript Variables
Most of the time, a JavaScript application needs to work with information. To store and represent this information in JavaScript codebase, we use variables. A variable is a container for a value.
Most of the time, a JavaScript application needs to work with information. To store and represent this information in the JavaScript codebase, we use variables. A variable is a container for a value.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://javascript.info/variables'>JavaScript Variables</BadgeLink>

@ -1,6 +1,6 @@
# Prototypes
JavaScript is an object-oriented language built around a prototype model. In JavaScript, every object inherits properties from its prototype, if there is any. A prototype is simply an object from which another object inherits properties. To create complex programs using JavaScript, one has to be proficient in working with prototypes — they form the very core of OOP in the language.
JavaScript is an object-oriented language built around a prototype model. In JavaScript, every object inherits properties from its prototype, if there are any. A prototype is simply an object from which another object inherits properties. To create complex programs using JavaScript, one has to be proficient in working with prototypes — they form the very core of OOP in the language.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.codeguage.com/courses/js/objects-prototypes'>Prototypes in JavaScript - A Comprehensive Guide</BadgeLink>

@ -1,6 +1,6 @@
# Arrays
Arrays are objects that store a collection of items and can be assigned to a variable. They have their own methods that can perform operations on the array.
Arrays are objects that store a collection of items and can be assigned to a variable. They have their methods that can perform operations on the array.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://javascript.info/array'>Working with Arrays in JavaScript</BadgeLink>

@ -1,6 +1,6 @@
# The `for` loop
The `for` loop is a standard control-flow construct in many programming languages, including JavaScript. It's commonly used to iterate over given sequences or iterate a known number of times, and execute a piece of code for each iteration.
The `for` loop is a standard control-flow construct in many programming languages, including JavaScript. It's commonly used to iterate over given sequences or iterate a known number of times and execute a piece of code for each iteration.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.codeguage.com/courses/js/loops-for-loop'>JavaScript `for` Loop - CodeGuage</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 @@
# Recursion
One of the most powerfula and elegant concept of functions, recursion is when a function invokes itself. Such a function is called a **_recursive function_**. As recursion happens, the underlying code of the recursive function gets executed again and again until a terminating condition, called the _base case_, gets fulfilled. As you dive into the world of algorithms, you'll come across recursion in many many instances.
One of the most powerful and elegant concept of functions, recursion is when a function invokes itself. Such a function is called a **_recursive function_**. As recursion happens, the underlying code of the recursive function gets executed again and again until a terminating condition, called the _base case_, gets fulfilled. As you dive into the world of algorithms, you'll come across recursion in many many instances.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://javascript.info/recursion'>Recursion and Stack</BadgeLink>

@ -1,6 +1,6 @@
# Lexical scoping
Before one can make intuition of closures in JavaScript, it's important to first get the hang of the term '**_lexical environment_**'. In simple words, the lexical environment for a function `f` simply refers to the environment enclosing that function's definition in the source code.
Before one can make an intuition of closures in JavaScript, it's important to first get the hang of the term '**_lexical environment_**'. In simple words, the lexical environment for a function `f` simply refers to the environment enclosing that function's definition in the source code.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.codeguage.com/courses/js/functions-closures#What_is_a_lexical_environment'>What is a lexical environment? - JavaScript - CodeGuage</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>

@ -1,6 +1,6 @@
# This Keyword
In JavaScript, the `this` keyword is a little different compared to other languages. It refers to an object, but it depends on how or where its being invoked. It also has some differences between strict mode and non-strict mode.
In JavaScript, the `this` keyword is a little different compared to other languages. It refers to an object, but it depends on how or where it is being invoked. It also has some differences between strict mode and non-strict mode.
- In an object method, `this` refers to the object
- Alone, `this` refers to the global object

@ -1,6 +1,6 @@
# Promises
Promises are a much better way to work with asynchronous code in JavaScript than the old and error-prone callback approach. They were introduced into JavaScript with ECMAScript 6. Using promises, we can manage extremely complex asynchronous code with rigorous error-handling set up, write code in a more or less synchronous style, and keep ourselves from running into the so-called callback hell.
Promises are a much better way to work with asynchronous code in JavaScript than the old and error-prone callback approach. They were introduced into JavaScript with ECMAScript 6. Using promises, we can manage extremely complex asynchronous code with rigorous error-handling setup, write code in a more or less synchronous style, and keep ourselves from running into the so-called callback hell.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.codeguage.com/courses/advanced-js/promises-introduction'>A Detailed Introduction to Promises</BadgeLink>

@ -1,6 +1,6 @@
# Javascript Iterators and Generators
Iterators and generators, introduced into JavaScript with ECMAScript 6, represent an extremely useful concept related to iteration in the language. Iterators are objects, abiding by the iterator protocol, that allow us to easily iterate over a given sequence in various ways, such as using the `for...of` loop. Generators, on the other hand, allow us to use functions and the `yield` keyword to easily define iterable sequences that are iterators as well.
Iterators and generators, introduced into JavaScript with ECMAScript 6, represent an extremely useful concept related to iteration in the language. Iterators are objects, abiding by the iterator protocol, that allows us to easily iterate over a given sequence in various ways, such as using the `for...of` loop. Generators, on the other hand, allow us to use functions and the `yield` keyword to easily define iterable sequences that are iterators as well.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.codeguage.com/courses/advanced-js/iteration-introduction'>Introduction to Iterators - Advanced JavaScript</BadgeLink>

Loading…
Cancel
Save