Project Report L-1
23 / 1 / 2023
Task 1: Basics of JavaScript '
Through this task I learnt the basics of Javascript and also created a web page that takes marks and names of students and calculates the following: Percentage of each studen lass Average and Rankings of the students.
Task1 souce code
Output of Task 1:
Task 2: Callback program to display Food Recipe
In this program we have used an asynchronous callback function. This technique allows a function to call another function While implementing I learnt about various functions and keywords of JavaScript. I also came across Callback hell and its disadvantages.
Task2 souce code
Task 3: Food Recipe Using Promise
Here instead of callback hell we have simplified the code using promises.
Code snippet of Promise:
Here is the output of the Task 3, that displays recipe of Mac and Cheese:
Benefits of using Promise are:
- It is a solution for callback hell
- Makes the code clean and organized
- Better error handling
- Improves code reusability
- Better asynchronous flow control
Task 4: Basics of Ubuntu
Subtasks :
a. Create a folder named test
b. Cd into that folder
c. Create a blank file without using any text editor
d. List the files in that folder
e. Create 2600 folders in this folder where each folder is named like M90 or B56 We can create multiple directories with single mkdir command using { } and separating each directory by comma. Here I have created 12 folders, we can do the same for 2600.
f. Concatenate two text files containing any random text and display them on the terminal
Task 5: Basics of Vi
The default editor that comes with the UNIX operating system is called vi (visual editor). Using vi editor, we can edit an existing file or create a new file from scratch. Code snippet
Task 6: Basics of regex and piping in Linux
Using last and grep command to extract login times:
Pipe into text file and put the same into a folder named logs:
Zip the folder using gzip and tar:
Final Output: You can see the zipped file in the desktop.
Find the codes in CL-CY