Skip to content

Commit 078a63a

Browse files
committed
updated readme
1 parent 18f162d commit 078a63a

File tree

4 files changed

+59
-1
lines changed

4 files changed

+59
-1
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
This is my complete path and roadmap with the code i have practised to master javascript.
22
This documentation of my journey will be the proof of my work and improvement
33

4+
5+
High level progression
6+
-variables and datatypes
7+
-Different kinds of operators and its precedence
8+
-Expression , statements
9+
-str concatination , multiline string, comments and template literals
10+
-conditional if - else if - else statements , switch statements and terenary operator
11+
-type conversion and type cohersion in - str , number and boolean
12+
-Loops in js , how to do nested looping - for,while,do while
13+
-Arrays and its depths
14+
-Functions and its depths
15+
-Objects and its depths
16+
-Classes and its depths
17+
-OOPS concepts in JS
18+
-Callbacks
19+
-Asyncronous Javascript concept
20+
-Promises
21+
-Async/await
22+
423
progression and topics learned
524
1. What are value
625
2. What is a variable

js_notes/cohertnotes/week1/node.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
var http = require('http');
2+
3+
http.createServer(function (req, res) {
4+
res.writeHead(200, {'Content-Type': 'text/html'});
5+
res.end('Hello World!');
6+
}).listen(8080);

js_notes/cohertnotes/week1/promise.js

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,37 @@ function ans(a,b,operation){
2929
let y = operation(b);
3030
console.log(x+y);
3131
}
32-
ans(1,2,cube);
32+
ans(1,2,cube);
33+
34+
// Promises are objects that represent the eventual outcome of an asynchronous operation. A Promise object can be in one of three states:
35+
36+
// Pending: The initial state— the operation has not completed yet.
37+
// Fulfilled: The operation has completed successfully and the promise now has a resolved value. For example, a request’s promise might resolve with a JSON object as its value.
38+
// Rejected: The operation has failed and the promise has a reason for the failure. This reason is usually an Error of some kind.
39+
// We refer to a promise as settled if it is no longer pending— it is either fulfilled or rejected. Let’s think of a dishwasher as having the states of a promise:
40+
41+
// Pending: The dishwasher is running but has not completed the washing cycle.
42+
// Fulfilled: The dishwasher has completed the washing cycle and is full of clean dishes.
43+
// Rejected: The dishwasher encountered a problem (it didn’t receive soap!) and returns unclean dishes.
44+
// If our dishwashing promise is fulfilled, we’ll be able to perform related tasks, such as unloading the clean dishes from the dishwasher. If it’s rejected, we can take alternate steps, such as running it again with soap or washing the dishes by hand.
45+
46+
// All promises eventually settle, enabling us to write logic for what to do if the promise fulfills or if it rejects.
47+
48+
function myownasync(duration){
49+
setTimeout(()=>console.log("hi"),duration);
50+
}
51+
console.log(myownasync(2000));
52+
53+
54+
function mypromise(duration){
55+
const p = new Promise(function(resolve){
56+
setTimeout(function(){
57+
resolve();
58+
},duration)
59+
});
60+
return p;
61+
}
62+
const output = mypromise(20000);
63+
output.then(function(){
64+
console.log("hi from my promise");
65+
});

js_notes/cohertnotes/week2/buildingpromise.js

Whitespace-only changes.

0 commit comments

Comments
 (0)