Skip to content

Commit 3ba47d8

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

18 files changed

+36
-16
lines changed

docs/JavaScript_Basics/math.js renamed to docs/JavaScript_Basics/math.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
// Math functions
23

34
// ceil and floor functions
@@ -49,4 +50,4 @@ function abs (value) {
4950
console.log(round(value3));
5051
console.log(pow(value4, value5));
5152
console.log(sqrt(value5));
52-
console.log(abs(99.99));
53+
console.log(abs(99.99));```

docs/JavaScript_Basics/number_methods.js renamed to docs/JavaScript_Basics/number_methods.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
// isFinite()
23

34
/*
@@ -149,4 +150,4 @@ This is rarely something done on your own, as JavaScript invokes this automatica
149150

150151
const age = new Number(45);
151152
typeof age; // object
152-
age.valueOf(); // 45
153+
age.valueOf(); // 45```

docs/JavaScript_Basics/objects.js renamed to docs/JavaScript_Basics/objects.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
// Object in basically collection of key value pairs
23
const old = {
34
name: "Swapnil", // left is key and right one is value
@@ -58,4 +59,4 @@ const canAddValue = { // This is normal object having 2 keys name and rollno
5859
canAddValue.branch = "Computer";
5960

6061
console.log(canAddValue);
61-
// Output { name: 'Swapnil', rollno: 76, branch: 'Computer' }
62+
// Output { name: 'Swapnil', rollno: 76, branch: 'Computer' }```

docs/JavaScript_Basics/page_redirects.js renamed to docs/JavaScript_Basics/page_redirects.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
/**
23
*
34
* JAVASCRIPT PAGE REDIRECTS
@@ -58,4 +59,4 @@ function AutoRefresh (t) {
5859
setTimeout("location.reload(true);", t);
5960
}
6061

61-
// Please look at the page-redirect.md file to see where you would include these scripts
62+
// Please look at the page-redirect.md file to see where you would include these scripts```

docs/JavaScript_Basics/popup_boxes.js renamed to docs/JavaScript_Basics/popup_boxes.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
/* eslint-disable no-unused-vars */
23
/* eslint-disable no-undef */
34

@@ -38,4 +39,4 @@ const getUserEnterredValue = (message) => prompt(message);
3839

3940
// sample
4041
const getUserPrimaryLanguage = (message) => getUserEnterredValue(message);
41-
console.log(getUserEnterredValue("which language is primary for you?")); // return sring with answer or null
42+
console.log(getUserEnterredValue("which language is primary for you?")); // return sring with answer or null```

docs/JavaScript_Basics/reduce.js renamed to docs/JavaScript_Basics/reduce.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
// JavaScript | Array reduce() Method
23
/*
34
The array reduce() method in JavaScript is used to reduce
@@ -11,4 +12,4 @@ const pokeLength = pokemon.reduce(function (previous, current) {
1112
return previous + current.length;
1213
}, 0);
1314

14-
// Outputs 27
15+
// Outputs 27```

docs/JavaScript_Basics/scope.js renamed to docs/JavaScript_Basics/scope.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
//JavaScript Scope
23

34
//Global scope
@@ -62,4 +63,4 @@ function accessingVariable() {
6263
}
6364
accessingVariable(); // return 1
6465
//end const
65-
//End Block scoping
66+
//End Block scoping```

docs/JavaScript_Basics/some.js renamed to docs/JavaScript_Basics/some.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
// JavaScript | some() Method
23
/*
34
some() method in JavaScript is used to check if leasts one element of the set meets the condition implemented by
@@ -27,4 +28,4 @@ const existAshley = array.some(element => element.name === "Ashley");
2728

2829
// The const existAshley return true or false if the condition is correct
2930

30-
// In this example the const existAshley return true
31+
// In this example the const existAshley return true```

docs/JavaScript_Basics/splice_slice.js renamed to docs/JavaScript_Basics/splice_slice.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
//###########
23
// SPLICE #
34
//###########
@@ -46,4 +47,4 @@ let coding = languages.slice(-3, -1);
4647
// ["C++", "Java", "Javascript", "R"]
4748
// -4 -3 -2 -1
4849
//
49-
// Slice excludes the last index when its negative. Hence, it will return elements at -3 and -2, ignoring element at -1.
50+
// Slice excludes the last index when its negative. Hence, it will return elements at -3 and -2, ignoring element at -1.```

docs/JavaScript_Basics/strict_mode.js renamed to docs/JavaScript_Basics/strict_mode.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
"use strict";
23
// examples taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode
34

@@ -21,4 +22,4 @@ fixed.newProp = "ohai"; // throws a TypeError
2122

2223
// deleting undeletable properties
2324
"use strict";
24-
delete Object.prototype; // throws a TypeError
25+
delete Object.prototype; // throws a TypeError```

docs/JavaScript_Basics/string_operation.js renamed to docs/JavaScript_Basics/string_operation.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
const into = "My college is SIESGST. Our seniors and alumnus are best in Mumbai";
23

34
const fullName = "My name is Swapnil Satish Shinde";
@@ -26,3 +27,4 @@ console.log("a casual lower case string")
2627
/** EXERCISE **/
2728
// Add a function to the string prototype that counts the occurrences of a substring
2829
// 'cheese and Bananas, and more cheese'.count('cheese') -----> 2
30+
```

docs/JavaScript_Basics/substr.js renamed to docs/JavaScript_Basics/substr.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
// define a dummy string
23
const str = "commonSourceOfTruth";
34

@@ -16,4 +17,4 @@ console.log(str.substring(0, 10)); // 'commonSour'
1617
console.log(str.substr(1, str.length - 2)); // ommonSourceOfTrut
1718

1819
// Substring takes indices
19-
console.log(str.substring(1, str.length - 1)); // ommonSourceOfTrut
20+
console.log(str.substring(1, str.length - 1)); // ommonSourceOfTrut```

docs/JavaScript_Basics/swap_values_ES6.js renamed to docs/JavaScript_Basics/swap_values_ES6.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
// Swap values before ES6
23
// BAD because you need temp variable z to hold x value
34
let x = 5, y = 7; // x = 5, y = 7;
@@ -8,4 +9,4 @@ y = z; // y = 5
89
// ES6 way
910
let x = 5, y = 7;
1011
[x, y] = [y, x];
11-
// x = 7, y = 5
12+
// x = 7, y = 5```

docs/JavaScript_Basics/switch_case.js renamed to docs/JavaScript_Basics/switch_case.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
/**
23
* 1. Where we use the Switch
34
* 2. More info about Switch
@@ -215,3 +216,4 @@ switch (true) {
215216
// how to convert bytes : 1Kb = 1024 b, 1Mb = 1024 Kb, 1Gb = 1024 Mb, 1 Tb = 1024 Gb.
216217
// Hint: the switch will test the value of 'unit', and will have to multiply the var "quantity" by the right number before putting it in the var "result". don't forget to add a default response!
217218

219+
```

docs/JavaScript_Basics/this.js renamed to docs/JavaScript_Basics/this.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
console.log(this); // This gives empty object
23
// Output {}
34

@@ -28,4 +29,4 @@ console.log(a);// Output 1
2829

2930
// console.log(b); // Output ReferenceError: b is not defined as b is in function scope only
3031

31-
help(); // Output 4
32+
help(); // Output 4```

docs/JavaScript_Basics/timer_functions.js renamed to docs/JavaScript_Basics/timer_functions.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
// setTimeout setInterval in both functions the time is specified in millisecond
23

34
// setTimeout This runs a code after given time starting from calling this method in program.
@@ -24,4 +25,4 @@ setTimeout(() => {
2425
SetInterval is Called
2526
SetTimeout is Called
2627
SetInterval is Called
27-
*/
28+
*/```

docs/JavaScript_Basics/type_conversions.js renamed to docs/JavaScript_Basics/type_conversions.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
// Example 1
23
let boo = false;
34
alert(typeof boo); // boolean
@@ -11,4 +12,4 @@ alert(typeof str); // string
1112

1213
const num = Number(str); // becomes a number 123
1314

14-
alert(typeof num); // number
15+
alert(typeof num); // number```

docs/JavaScript_Basics/variables.js renamed to docs/JavaScript_Basics/variables.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```js
12
/* eslint no-var: "off" */
23

34
// There is only 3 types of variables in javascript
@@ -18,4 +19,4 @@ console.log(PI) // Output {3.14}
1819
// let a = "User's name" for let userNickName = "User's name"
1920
//*CammelCase for a better understaning, JS has case sensitive.
2021
//*Variables names must begin with a letter.
21-
//*write constants with Upper case.
22+
//*write constants with Upper case.```

0 commit comments

Comments
 (0)