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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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```

0 commit comments

Comments
 (0)