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

+2-2
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

+3-3
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

+4-4
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

+2-2
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

+4-4
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

+1-1
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

+3-3
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

+2-2
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

+1-1
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

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

JavaScript_Basics/exercise-1-using-classes.js

+2-2
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

+2-2
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 dont 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

+1-1
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(){

JavaScript_Basics/objects.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Object in basically colection of key value pairs
1+
// Object in basically collection of key value pairs
22
let old = {
33
"name": "Swapnil",// left is key and right one is value
44
"rollno": 76, // We assign any type to keys
@@ -8,7 +8,7 @@ console.log(old);
88
// Output { name: 'Swapnil', rollno: 76 }
99

1010
let a = {
11-
name: "Swapnil",// We can omit the " " in keys but for string values it is neccessary
11+
name: "Swapnil",// We can omit the " " in keys but for string values it is necessary
1212
rollno: 76, // We assign any type to keys
1313
};
1414

@@ -24,22 +24,22 @@ let b = {
2424
console.log(b);
2525
// Output { name: 'Swapnil', rollno: 'Swap' }
2626

27-
console.log(a["name"]); // This way we can get a perticular value for a key. " " around are imp.
27+
console.log(a["name"]); // This way we can get a particular value for a key. " " around are imp.
2828

29-
console.log(a.name); // This way you can get the value of perticular element
29+
console.log(a.name); // This way you can get the value of particular element
3030
// Output Swapnil
31-
a.name = "Swapnil Satish Shinde"; // This way we can change a perticular property of object
31+
a.name = "Swapnil Satish Shinde"; // This way we can change a particular property of object
3232

33-
console.log(a.name); // This way you can get the value of perticular element
33+
console.log(a.name); // This way you can get the value of particular element
3434
// Output Swapnil Satish Shinde
3535

3636
console.log(a);
3737
// Output { name: 'Swapnil Satish Shinde', rollno: 76 }
3838

3939
let objectWithFunction = {
40-
name: "Swapnil",// We can omit the " " in keys but for string values it is neccessary
40+
name: "Swapnil",// We can omit the " " in keys but for string values it is necessary
4141
rollno: 76, // We assign any type to keys
42-
getfull: function() { // Dont use arrow funciton here as arrow functions dont have this property
42+
getfull: function() { // Dont use arrow funciton here as arrow functions don't have this property
4343
console.log(`${this.name} ${this.rollno}`);
4444
}
4545
};

JavaScript_Basics/this.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ console.log(global.aa); // Global scope is accessible to every where
1313
let b = 2
1414
console.log(b);
1515
}
16-
console.log(a);// Output 1 as variable a is decleared using var
16+
console.log(a);// Output 1 as variable a is declared using var
1717
console.log(a);
1818

19-
// console.log(b) // Output ReferenceError: b is not defined as b is defined using let it is going to be decleared only in that block
19+
// console.log(b) // Output ReferenceError: b is not defined as b is defined using let it is going to be declared only in that block
2020

2121
const help = () => {
2222
var a = 4;
23-
let b =2; // variables defined by let and const are accisible to there scope only
24-
console.log(a); // This will not get printed unless and untill function is called
23+
let b =2; // variables defined by let and const are accessible to there scope only
24+
console.log(a); // This will not get printed unless and until function is called
2525
}
2626

2727
console.log(a);// Output 1

JavaScript_Basics/variables.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// There is only 3 types of variables in javascript
22

3-
let a = "Swapnil"; // New type introdued in ES6. Value of let can change any time.
3+
let a = "Swapnil"; // New type introduced in ES6. Value of let can change any time.
44

55

6-
const pi = 3.14;// New type introdued in ES6. Value of pi now cannot be changed as this is defined as const.
6+
const pi = 3.14;// New type introduced in ES6. Value of pi now cannot be changed as this is defined as const.
77

8-
var b = 26;// This is Depricated as this creates many probles in future.
8+
var b = 26;// This is Deprecated as this creates many problems in future.

README.md

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

0 commit comments

Comments
 (0)