Skip to content

Commit 218744d

Browse files
authored
Merge branch 'master' into master
2 parents 4e2e716 + f32b274 commit 218744d

File tree

9 files changed

+17
-16
lines changed

9 files changed

+17
-16
lines changed

JavaScript_Advance/destructuring.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ array = [1, 2, 3, 4] // Array Declaration
1919

2020
let [ first, second, ,fourth ] = array // Array Destructuring
2121
// In this the Order of variables matters the most as arrays don't have keys
22-
// For skipping some values we can do that using as shown here we have skiped the third value
2322

23+
// For skipping some values we can do that using as shown here we have skiped the third value
2424
console.log(fourth); // Output 4
2525

2626
newArray = ["Swapnil", 19, "Shinde"] // New array

JavaScript_Advance/fsModule.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Fs is a inbuilt function in nodejs to perform operations on files
22

3+
34
// There are always two ways to do fs operation as sync and async
45

56
// Fs library sends data event continuously in this case event emitter comes into picture
@@ -10,14 +11,14 @@ const fs = require('fs');
1011
// Here we created a read stream will give output as a object into string
1112
const content = fs.createReadStream('./Order.txt');
1213

13-
/* If we dont use the encoding as utf8 then it will print data in the form of buffer only
14+
/* If we don't use the encoding as utf8 then it will print data in the form of buffer only
1415
<Buffer 61 72 72 6f 77 46 75 6e 63 74 69 6f 6e 0a 64 65 73 74 72 75 63 74 75 72 69 6e 67 0a 73 70 72 65 61 64 20 61 6e 64 20 72 65 73 74 0a 74 69 6d 65 72 46 ... 35 more bytes>
1516
*/
1617
content.setEncoding('UTF8');// This encodes the data into our desired type
1718

1819
// Here we are listing to the event of closing of a file
1920
content.on('open',() => {
20-
console.log("File opend for reading");
21+
console.log("File opened for reading");
2122
});
2223

2324
// Here we are listening to the event called data which will be called when data is present

JavaScript_Advance/spread&rest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
let marks = [1,2,3,4,5,6,7,8,9]; // Array Declearation
1+
let marks = [1,2,3,4,5,6,7,8,9]; // Array Declaration
22

33
// If we want 1 to 3 as different variables and 4 to 9 as full array then in such cases we use "rest" operator
44

JavaScript_Basics/Exercise-1.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Create object of student have his details of firstname lastname age college bio
1+
1. Create an object of student containing his/her first name, last name, age, college and bio;
22

3-
We want his fullname bio all details using normal functions
3+
2. Encapsulate (with getters and setters) the user details using normal functions;
44

5+
3. Implement a class called "Student", which should contain his/her first and last name, age, college and bio;
56

6-
Create class of student take his details of firstname lastname age college bio
7+
4. Encapsulate (with getters and setters) the user details using class members;
78

8-
We want his fullname bio all details using class methods

JavaScript_Basics/Order.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This file states the order of modules you should be learning according to get most out of it:-
1+
This file states the order of modules you should be learning according to get most out of it:
22

33
Day 1
44

JavaScript_Basics/functions.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ function Add (a,b) { // Here We have taken 2 Arguments a and b
1414
console.log(Add(10,5)); // This Calls the function
1515
// We have to directly pass the arguments in function call
1616

17-
// Functions which dont have name are called Anonymous this should be assigned to a particular variable
17+
18+
// Functions which don't have name are called Anonymous this should be assigned to a particular variable
1819
let helpFast = function (){
1920
return("Fast Fast");
2021
}

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# Javascript
2-
This repository is for beginners to start learning Javascript from scratch
1+
# Javascript Basics
2+
3+
This repository was made for beginners to start learning Javascript from Scratch

References.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
If you want to learn more about JS's syntax and methods, check out [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
2+

Refrences.txt

-4
This file was deleted.

0 commit comments

Comments
 (0)