Skip to content

Commit e4ae3ae

Browse files
authored
Merge pull request #10 from alsd4git/master
fixed every typo i could find
2 parents 2fecb27 + 9910500 commit e4ae3ae

13 files changed

Lines changed: 39 additions & 39 deletions

‎JavaScript_Advance/destructuring.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// As data coming from the server is very big then there is better way of getting the data out of object
2-
let a = { // Suppose this is the object comming from server then
2+
let a = { // Suppose this is the object coming from server then
33
name : "Swapnil",
44
age : 19,
55
college : "SIES"
@@ -11,15 +11,15 @@ let { name, age, college } = a; // This way name variable gets "Swapnil" this is
1111

1212
console.log(name); // Output Swapnil
1313

14-
let {name:Myname} = a // This way Myname variable get assinged the value of name key in from object a
14+
let {name:Myname} = a // This way Myname variable get assigned the value of name key in from object a
1515

1616
console.log(Myname); // Output Swapnil
1717

18-
array = [1, 2, 3, 4] // Array Declearation
18+
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 skiiped the third value
22+
// For skipping some values we can do that using as shown here we have skipped the third value
2323

2424
console.log(fourth); // Output 4
2525

‎JavaScript_Advance/eventloop.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ setTimeout(() => {
44

55
console.log("Last statment"); // This statment gets printed first
66

7-
// This enables the non blocking using event based managment
7+
// This enables the non blocking using event based management

‎JavaScript_Advance/fsModule.js‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
// Fs is a inbuild function in nodejs to perfom operations on files
1+
// Fs is a inbuild function in nodejs to perform operations on files
22

33
// There are always two ways to do fs operation as sync and async
44

5-
// Fs library sends data event continously in this case event emmiter comes into picture
5+
// Fs library sends data event continuously in this case event emitter comes into picture
66

77
// For importing the fs module we have following syntax
88
const fs = require('fs');
99

1010
// Here we created a read stream will give output as a object into string
1111
const content = fs.createReadStream('./Order.txt');
1212

13-
/* If we dont use the encoding as utf8 then it will print data in the form of buffer only
13+
/* If we don't use the encoding as utf8 then it will print data in the form of buffer only
1414
<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>
1515
*/
1616
content.setEncoding('UTF8');// This encodes the data into our desired type
1717

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

23-
// Here we are listning to the event called data which will be called when data is present
23+
// Here we are listing to the event called data which will be called when data is present
2424
content.on('data', (data) => {
2525
console.log(data);
2626
});
@@ -32,7 +32,7 @@ content.on('close',() => {
3232

3333
// Output is going to be
3434
/*
35-
File opend for reading
35+
File opened for reading
3636
arrowFunction
3737
destructuring
3838
spread and rest

‎JavaScript_Advance/promises.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// promises promise the nodejs main thread that i'm going to come after doing a perticular task
1+
// promises promise the nodejs main thread that i'm going to come after doing a particular task
22

33
let a = new Promise ((resolve, reject) => { // This is a empty promise
44
// resolve will only be called if there is data to return like resolve(data);

‎JavaScript_Advance/spread&rest.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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

3-
// If we want 1 to 3 as diffrent variables and 4 to 9 as full array then in such cases we use "rest" operator
3+
// 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

55
let [first, second, third, ...remaining] = marks;
66

@@ -15,7 +15,7 @@ let a = {
1515
college : "SIES"
1616
};
1717

18-
let {name ,age, ...unwanted} = a; // Here in unwanted all key and values expect the name and age will come this is diffrent than arrays
18+
let {name ,age, ...unwanted} = a; // Here in unwanted all key and values expect the name and age will come this is different than arrays
1919

2020
console.log(unwanted);// Output { branch: 'Comps', college: 'SIES' }
2121

@@ -26,7 +26,7 @@ let array1 = [1,2,3,4,5,6];
2626

2727
let array2 = [6,7,8,9,10];
2828

29-
let combinedArray = [...array1, ...array2]; // Here "..." are considerd as spread operation we are spreading the two arrays into one
29+
let combinedArray = [...array1, ...array2]; // Here "..." are considered as spread operation we are spreading the two arrays into one
3030

3131
console.log(combinedArray);
3232
/* Output

‎JavaScript_Advance/timerFunctions.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// setTimeout setInterval in both functions the time is specifed in milisecond
1+
// setTimeout setInterval in both functions the time is specified in millisecond
22

33
// setTimeout This runs a code after given time starting form calling this method in program.
44

55
setTimeout( () => {
66
console.log("SetTimeout is Called")
77
}, 5000); // This will print SetTimeout is Called after 5sec after calling it
88

9-
// For stoping this we can use ClearTimeout
9+
// For stopping this we can use ClearTimeout
1010

1111
// setInterval This runs a code after specific interval of time till we stop the timer.
1212

‎JavaScript_Basics/classes.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class StudentInfo {
1616
// college = "SIES"; // This is allowed above ES7, ES8
1717
constructor (name){ // name and age are arguments given to object at the time of creation of object
1818
this.name = name; // This initializes the local variable as name passed in argument
19-
this.college = "SIES"; // We want the College to be same for all stundents that's why it is decleared outside of constructor
19+
this.college = "SIES"; // We want the College to be same for all stundents that's why it is declared outside of constructor
2020
}
2121
getNameAndCollege (){ // This is a methon in Stdent
2222
console.log(`${this.name} ${this.college}`);

‎JavaScript_Basics/exercise-1-using-classes.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Student {
2-
// Created the constuctor for student
2+
// Created the constructor for student
33
constructor (firstName,lastName,age,college,bio){
44
this.firstName = firstName;
55
this.lastName = lastName;
@@ -8,7 +8,7 @@ class Student {
88
this.bio = bio;
99
}
1010

11-
// This method retunrs combined firstname and lastname
11+
// This method returns combined firstname and lastname
1212
getFullName() {
1313
return(`${this.firstName} ${this.lastName}`);
1414
}

‎JavaScript_Basics/functions.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function helpGST () { // This way you can write functions in JS
2-
// There is no requirement of specifing the return type of function
2+
// There is no requirement of specifying the return type of function
33
console.log("Hii GST");
44
}
55
// Function is written to do a specific task many types in program.
@@ -14,7 +14,7 @@ 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 assined to a perticular variable
17+
// Functions which don't have name are called Anonymous this should be assigned to a particular variable
1818
let helpFast = function (){
1919
return("Fast Fast");
2020
}

‎JavaScript_Basics/inheritance.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// common functions are combined in a class to have less repeatition in code
1+
// common functions are combined in a class to have less repetition in code
22

33
class Animals { // Animal class is created where the legs are defined 4
44
constructor(){

0 commit comments

Comments
 (0)