Skip to content

Commit 4e2e716

Browse files
committed
General spelling and grammar fixed
1 parent 2fecb27 commit 4e2e716

17 files changed

+44
-44
lines changed

JavaScript_Advance/arrowFunction.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Student {
3737

3838
console.log((new Student).getName()) // Gives error for node versions before 12.4.0(Approx) SyntaxError: Unexpected token =
3939

40-
class Studentinfo {
40+
class StudentInfo {
4141

4242
constructor (firstName,lastName, age, branch, college){
4343
this.firstName = firstName;
@@ -57,6 +57,6 @@ class Studentinfo {
5757

5858
}
5959

60-
let Swapnil = new Studentinfo("Swapnil", "Shinde",19, "Computer", "Sies"); // This way we can create new objects with arguments
60+
let Swapnil = new StudentInfo("Swapnil", "Shinde",19, "Computer", "Sies"); // This way we can create new objects with arguments
6161

6262
console.log(Swapnil.getFullName()); // Output My name is Swapnil Shinde

JavaScript_Advance/defaultValues.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ const helpGST = (name, age) => {
44

55
helpGST(); // Output will be undefined undefined
66

7-
const helpGSTwithDefaultValues = (name, age=19) => {
7+
const helpGSTWithDefaultValues = (name, age=19) => {
88
console.log(name,age);
99
}
1010

11-
helpGSTwithDefaultValues("Swapnil"); // Output Swapnil 19
11+
helpGSTWithDefaultValues("Swapnil"); // Output Swapnil 19
1212

13-
helpGSTwithDefaultValues("Vishal",23); // Output Vishal 23
13+
helpGSTWithDefaultValues("Vishal",23); // Output Vishal 23

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 skiped the third value
2323

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

JavaScript_Advance/eventloop.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ setTimeout(() => {
22
console.log("Hey im setTimeout");
33
}, 3000); // Here program goes into waiting state till timer becomes zero
44

5-
console.log("Last statment"); // This statment gets printed first
5+
console.log("Last statment"); // This statement 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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// Fs is a inbuild function in nodejs to perfom operations on files
1+
// Fs is a inbuilt 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');
@@ -20,7 +20,7 @@ content.on('open',() => {
2020
console.log("File opend 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 listening 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
let marks = [1,2,3,4,5,6,7,8,9]; // Array Declearation
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/arrays.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Javascript arrays can take any values in the same array
2-
// We dont have to specify the size
2+
// We don't have to specify the size
33
let a = ['hii', 26 , "Swapnil"];
44

55
console.log(a);

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 students 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}`);

0 commit comments

Comments
 (0)