Skip to content

Commit 5350359

Browse files
committed
cohert vid1 notes
1 parent c27a295 commit 5350359

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed

js_notes/cohert1-v1.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
Video 1
3+
4+
Introduction
5+
6+
Initially we could communicate with the computer only using binary and assembly code but it was not a optimal way to write code because each hardware processor have different assembly code to do the same process so the software solutions can't be scaled. Thats the reason why we are having high level languages now which are comparitively easy to write as well as scalable because the comiler compiles the high level code into machine understandable code.
7+
8+
JS Architecture
9+
10+
11+
12+
Primities of javascript
13+
1.Variables
14+
2.Strings
15+
3.Arrays
16+
4.Numbers
17+
5.Loops - for and while
18+
6.Functions - Prinmitives and callbacks
19+
API - native vs web
20+
*/
21+
22+
23+
24+
//Question1
25+
// sum from 1 to 100
26+
let sum = 0;
27+
for(let i=0;i<=100;i++){
28+
sum = sum + i;
29+
}
30+
console.log(sum);
31+
32+
//Question2
33+
//Print fibonacci series - it is a series of number where every number is the sum of the preceeding 2 numbers
34+
let t1 = 0,t2=1;
35+
let terms = 10;
36+
let nextterm;
37+
console.log(t1);
38+
console.log(t2);
39+
for(let i=3;i<=terms;++i){
40+
nextterm = t1+t2
41+
console.log(nextterm);
42+
t1 = t2;
43+
t2 = nextterm;
44+
nextterm = t1+t2;
45+
}
46+

js_notes/note.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

js_notes/patternQ.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//Square star pattern in js -(5 x 5)
2+
/*
3+
*****
4+
*****
5+
*****
6+
*****
7+
*****
8+
*/
9+
for(let i=0;i<5;i++){
10+
for(let j=0;j<=i;j++){
11+
console.log("*");
12+
}
13+
}

0 commit comments

Comments
 (0)