Skip to content

Commit ae4196a

Browse files
committed
Converting .js file to .md to make it accessible by Docsify
1 parent 3ba47d8 commit ae4196a

16 files changed

+32
-14
lines changed

docs/JavaScript_Advance/AJAX_request.js renamed to docs/JavaScript_Advance/AJAX_request.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
const POST = "POST";
23

34
export class AJAXRequest {
@@ -26,4 +27,4 @@ export const open = (method, url, async) => {
2627
usedMethod = method;
2728
request.open(method, url, async);
2829
};
29-
export const send = string => (usedMethod === POST ? request.send(string) : request.send());
30+
export const send = string => (usedMethod === POST ? request.send(string) : request.send());```

docs/JavaScript_Advance/arrow_function.js renamed to docs/JavaScript_Advance/arrow_function.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
let a = () => {
23
// This is arrow function came new in ES6
34
//It assigns the function to variable a as the identifier with let instead and adds arrows before the curly braces.
@@ -80,3 +81,4 @@ setTimeout(function () {
8081
setTimeout(() => {
8182
console.log("hello world");
8283
}, 0); //arrow functions provide better readability
84+
```

docs/JavaScript_Advance/assignments_arithmetic.js renamed to docs/JavaScript_Advance/assignments_arithmetic.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
/* In javascript there are always several ways to the goal.
23
Also the syntax of variable assignment can be abbreviated.
34
This is particularly suitable for mathematic operators
@@ -111,4 +112,4 @@ y = 5 ** 2; // y: 25
111112

112113
// Shortcut
113114
y = 5;
114-
y **= 2; // y: 25
115+
y **= 2; // y: 25```

docs/JavaScript_Advance/assignments_bitwise.js renamed to docs/JavaScript_Advance/assignments_bitwise.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
/* In javascript there are always several ways to the goal.
23
Also the syntax of variable assignment can be abbreviated.
34
This is also suitable for bitwise operations
@@ -86,4 +87,4 @@ y ^= x; // y: 0101 (binary)
8687

8788
// Basic
8889
y = 5; // y: 00000000000000000000000000000101 (binary)
89-
y = ~y; // y: 11111111111111111111111111111010 (binary) -6 (decimal)
90+
y = ~y; // y: 11111111111111111111111111111010 (binary) -6 (decimal)```

docs/JavaScript_Advance/async_await.js renamed to docs/JavaScript_Advance/async_await.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
// Async Await Flow on JavaScript
23

34
// the most common case to use async await is to handle promises for fetch request
@@ -39,3 +40,4 @@ const getUsers = async () => {
3940
console.log('DISPLAY AN ERROR', error)
4041
}
4142
}
43+
```

docs/JavaScript_Advance/bind.js renamed to docs/JavaScript_Advance/bind.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
/* The bind() method creates a new function that, when called, has its this keyword set
23
to the provided value, with a given sequence of arguments preceding any provided
34
when the new function is called.
@@ -15,4 +16,4 @@ console.log(unboundGetX()); // The function gets invoked at the global scope
1516

1617
const boundGetX = unboundGetX.bind(module);
1718
console.log(boundGetX());
18-
// expected output: 42
19+
// expected output: 42```

docs/JavaScript_Advance/caesar_cipher.js renamed to docs/JavaScript_Advance/caesar_cipher.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
/**
23
* Most simplest encryption scheme. Read more: [http://practicalcryptography.com/ciphers/caesar-cipher/]
34
**/
@@ -43,4 +44,4 @@ function caesarCipher (toEncipher, shift = 0) {
4344
return output;
4445
}
4546

46-
module.exports = caesarCipher;
47+
module.exports = caesarCipher;```

docs/JavaScript_Advance/callback.js renamed to docs/JavaScript_Advance/callback.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
/**
23
* Callback functions are derived from a programming paradigm called
34
* `functional programming`. This basically can be concluded to this sentence:
@@ -150,4 +151,4 @@ axios({
150151
* instead of using callback functions. This approach also have pros and cons. One of
151152
* the cons of this approach, is instead of nested `.then()` blocks, you are going to
152153
* need nested `try` `catch` blocks. Sometimes this kind of problems are inevitable.
153-
*/
154+
*/```

docs/JavaScript_Advance/classes.js renamed to docs/JavaScript_Advance/classes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
class Student {
23
// onlyname; // This should not have let or const only in classes
34
constructor (name, age) { // name and age are arguments given to object at the time of creation of object
@@ -25,4 +26,4 @@ class StudentInfo {
2526
}
2627

2728
const SwapnilInfo = new StudentInfo("Swapnil Bio");
28-
SwapnilInfo.getNameAndCollege();
29+
SwapnilInfo.getNameAndCollege();```

docs/JavaScript_Advance/closures.js renamed to docs/JavaScript_Advance/closures.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
/*
23
A closure is the combination of a function bundled together (enclosed)
34
with references to its surrounding state (the lexical environment).
@@ -27,4 +28,4 @@ explains closures
2728
*/
2829

2930
console.log(modifier());
30-
// [out] Original String: --->sample string, Modified String: ---> sample string is modified
31+
// [out] Original String: --->sample string, Modified String: ---> sample string is modified```

0 commit comments

Comments
 (0)