diff --git a/README.md b/README.md index 52f94ed4..e20a119a 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# batch-1 \ No newline at end of file +# batch-1 diff --git a/daily sessions/Day-01-03Jan22/Task-01/README.md b/daily sessions/Day-01-03Jan22/Task-01/README.md new file mode 100644 index 00000000..81790c95 --- /dev/null +++ b/daily sessions/Day-01-03Jan22/Task-01/README.md @@ -0,0 +1,5 @@ +# Task #1 +Create a basic HTML page and do the following: + 1. Write an inline script + 2. Write an internal script + 3. Import 1 external Js file diff --git a/daily sessions/Day-01-03Jan22/Task-01/externalJsFile.js b/daily sessions/Day-01-03Jan22/Task-01/externalJsFile.js new file mode 100644 index 00000000..06e401bd --- /dev/null +++ b/daily sessions/Day-01-03Jan22/Task-01/externalJsFile.js @@ -0,0 +1,4 @@ +function myFunction2(){ + var name=document.getElementById("name").value; + document.write(name); +} diff --git a/daily sessions/Day-01-03Jan22/Task-01/index.html b/daily sessions/Day-01-03Jan22/Task-01/index.html new file mode 100644 index 00000000..396e1f1f --- /dev/null +++ b/daily sessions/Day-01-03Jan22/Task-01/index.html @@ -0,0 +1,25 @@ + + + + + + + Task 1 - D1 - Swiggy i++ + + + + + +
Hello World!

+ + +

+ Insert input to check the external js function in action : + + + + \ No newline at end of file diff --git a/daily sessions/Day-01-03Jan22/Task-02/index.html b/daily sessions/Day-01-03Jan22/Task-02/index.html new file mode 100644 index 00000000..6a3b8410 --- /dev/null +++ b/daily sessions/Day-01-03Jan22/Task-02/index.html @@ -0,0 +1,25 @@ + + + + + + + Task 2 - D1 - Swiggy i++ + + + +
My name will come here, if the below button is clicked.


+ 1.innerHTML() Function :

+
+ 2.document.write() Function : +

+ 3.window.alert() Function : +

+ 4.window.print() Function : +

+ 5.console.log() Function : + After clicking the button, open Console tab to check the input. :) +

+ + \ No newline at end of file diff --git a/daily sessions/Day-01-03Jan22/Task-02/index.js b/daily sessions/Day-01-03Jan22/Task-02/index.js new file mode 100644 index 00000000..0f759f8a --- /dev/null +++ b/daily sessions/Day-01-03Jan22/Task-02/index.js @@ -0,0 +1,25 @@ +function innerHTML1(){ + var name = "Hey, there. It's Ashwin here"; + document.getElementById("innerHTML").innerHTML=name; + +} +function documentWrite1(){ + var name1 = document.getElementById("documentWrite1").value; + document.write(name1); +} + +function alert1(){ + var name2 = "I have triggered Window.alert() now"; + window.alert(name2); +} + +function print1() { + var name3 = "I have triggered Window.print() now"; + window.print(name3); +} + +function log1() { + var name4 = "I have triggered console.log() now"; + console.log(name4); + +} \ No newline at end of file diff --git a/daily sessions/Day-02-04Jan22/Notes/README.md b/daily sessions/Day-02-04Jan22/Notes/README.md new file mode 100644 index 00000000..bfc5e249 --- /dev/null +++ b/daily sessions/Day-02-04Jan22/Notes/README.md @@ -0,0 +1,44 @@ +### Inline Script: +* Inline scripts cannot be reused. +### Hoisting : +* Hoisting is used for 're-use' of the code. +* Hoisting is Javascript's default behaviour of moving all declarations to the top of the current scope ( to the top of the current script or the current function ) +* Hoisting a `let` variable before declaration causes `ReferenceError - Cannog access the let variable before intialization`. +* With `const`, you cant use a variable before it is declared. Error : `Missing initializer in const declaration.` + +### Date: + +* `const d1 = new Date();` +* `const d2 = new Date(year,month,day,hours,seconds,milliseconds);` +* `cost d3 = new Date(milliseconds);` +* `const d4 = new Date(date string);` + +* Month from 0 to 11 (12 will overflow to next Jan) +* Day overflow will spill over to next month +* Using lesser parameters will exclue from the right + +### Array: +* Array definition +* Methods +* Sort (string and number) - mynum.sort(function(a,b){return a-b}); +* Iterating arrays - forEach() +* toString, pop, push, shift, unshift, splice,concat, slice +* Math.max.apply(null,param) to find max number +* Map(), filter(), reduce() [myfunc(prev,curvalue)],every(),includes(),find(),findIndex() +* from(), keys() + +### Sets: + +* new Set() +* add() +* delete() +* has() +* forEach() +* values() +* size() +* entries() + + +## Assignment 1: +1. Modify innerHTML, style.fontSize, style.display, style.visibility,document.getElementById(“test”).value; +2. Array Methods, Objects, Sets and Maps. \ No newline at end of file diff --git a/daily sessions/Day-02-04Jan22/Notes/index.html b/daily sessions/Day-02-04Jan22/Notes/index.html new file mode 100644 index 00000000..e69de29b diff --git a/daily sessions/Day-02-04Jan22/Notes/index.js b/daily sessions/Day-02-04Jan22/Notes/index.js new file mode 100644 index 00000000..af0426a9 --- /dev/null +++ b/daily sessions/Day-02-04Jan22/Notes/index.js @@ -0,0 +1,24 @@ +//Inline Scripting: + + /* Javascript Inline script can be written in this syntax. + + */ + +//Hoisting: + + // let: + myName = "let-ashwin"; + //let myName; - Error : Cannot access 'myName' before initializations. + console.log(myName); + // const: + constName = "const-ashwingopalsamy"; + //const constName; - Error: Missing initializer in const declaration. + console.log(constName); + +//Date: + + function dateFunction() { + + } \ No newline at end of file diff --git a/daily sessions/Day-03-05Jan22/README.md b/daily sessions/Day-03-05Jan22/README.md new file mode 100644 index 00000000..87ecba4c --- /dev/null +++ b/daily sessions/Day-03-05Jan22/README.md @@ -0,0 +1,39 @@ +## exports: + +* module that can be re-used. + +## built in modules: +1. assert +2. buffer +3. child_process +4. cluster +5. crypto +6. dgram +7. dns +8. domain +9. events +10. fs +11. http +12. https +13. net +14. os +15. path +16. punycode +17. querystring +18. readline +19. stream +20. string_decoder +21. timers +22. tls +23. tty +24. url +25. util +26. v8 +27. vm +28. zlib + + +## file system module : +* http, fs, request, response, +* uploadFile - incomingForm + diff --git a/daily sessions/Day-03-05Jan22/my-first-page/index.js b/daily sessions/Day-03-05Jan22/my-first-page/index.js new file mode 100644 index 00000000..ac9b361f --- /dev/null +++ b/daily sessions/Day-03-05Jan22/my-first-page/index.js @@ -0,0 +1,7 @@ +var http = require('http'); +var dt = require('./myfirstmodule'); +http.createServer(function(req,res){ + res.writeHead(200,{'Content-Type':'text/html'}); + res.write("The date and time are currently "+dt.myDateTime()); + res.end(); +}).listen(8080); \ No newline at end of file diff --git a/daily sessions/Day-03-05Jan22/my-first-page/myfirstmodule.js b/daily sessions/Day-03-05Jan22/my-first-page/myfirstmodule.js new file mode 100644 index 00000000..a6239f28 --- /dev/null +++ b/daily sessions/Day-03-05Jan22/my-first-page/myfirstmodule.js @@ -0,0 +1,3 @@ +exports.myDateTime = function () { + return Date(); +} \ No newline at end of file diff --git a/daily sessions/Day-03-05Jan22/my-fsread-page/index.js b/daily sessions/Day-03-05Jan22/my-fsread-page/index.js new file mode 100644 index 00000000..7db6bb79 --- /dev/null +++ b/daily sessions/Day-03-05Jan22/my-fsread-page/index.js @@ -0,0 +1,9 @@ +var http = require('http'); +var fs = require('fs'); +http.createServer(function(req,res){ + fs.readFile('hobbies.html',function(err,data){ + res.writeHead(200,{'Content-Type':'text/html'}); + res.write(data); + return res.end(); + }); +}).listen(8080); \ No newline at end of file diff --git a/resources/case-studies/Problem Statement 1- Meeting Application.pdf b/resources/case-studies/Problem Statement 1- Meeting Application.pdf new file mode 100644 index 00000000..e4fbc5c1 Binary files /dev/null and b/resources/case-studies/Problem Statement 1- Meeting Application.pdf differ diff --git a/resources/case-studies/Problem Statement 2_food-app.pdf b/resources/case-studies/Problem Statement 2_food-app.pdf new file mode 100644 index 00000000..b3248763 Binary files /dev/null and b/resources/case-studies/Problem Statement 2_food-app.pdf differ diff --git a/resources/case-studies/Problem Statement 3-stack-overflow.pdf b/resources/case-studies/Problem Statement 3-stack-overflow.pdf new file mode 100644 index 00000000..11b59664 Binary files /dev/null and b/resources/case-studies/Problem Statement 3-stack-overflow.pdf differ diff --git a/resources/my-form-responses/day3.pdf b/resources/my-form-responses/day3.pdf new file mode 100644 index 00000000..1caced5b Binary files /dev/null and b/resources/my-form-responses/day3.pdf differ