22CS102 SDP UNIT 4 Updated
22CS102 SDP UNIT 4 Updated
This document is confidential and intended solely for the educational purpose of
RMK Group of Educational Institutions. If you have received this document
through email in error, please notify the system manager. This document
contains proprietary information and is intended only to the respective group /
learning community as intended. If you are not the addressee you should not
disseminate, distribute or copy through e-mail. Please notify the sender
immediately by e-mail if you have received this document by mistake and delete
this document from your system. If you are not the intended recipient you are
notified that disclosing, copying, distributing or taking any action in reliance on
the contents of this information is strictly prohibited.
22CS102
SOFTWARE DEVELOPMENT PRACTICES
OBJECTIVES:
∙ To discuss the essence of agile development methods.
∙ To set up and create a GitHub repository.
∙ To create interactive websites using HTML
∙ To design interactive websites using CSS.
∙ To develop dynamic web page using Javascript.
UNIT I AGILE SOFTWARE DEVELOPMENT, Git AND GitHub 15
Software Engineering Practices – Waterfall Model - Agility – Agile Process –Extreme
Programming - Agile Process Models – Adaptive Software Development – Scrum –
Dynamic Systems Development Method – Crystal – Feature Driven Development – Lean
Software Development – Agile Modeling – Agile Unified Process – Tool set for Agile
Process.
Introduction to Git – Setting up a Git Repository - Recording Changes to the Repository -
Viewing the Commit History - Undoing Things - Working with Remotes -Tagging - Git
Aliases- Git Branching - Branches in a Nutshell - Basic Branching and Merging - Branch
Management - Branching Workflows - Remote Branches - Rebasing.
Introduction to GitHub – Set up and Configuration - Contribution to Projects, Maintaining
a Project – Scripting GitHub.
UNIT II HTML 15
Introduction – Web Basics – Multitier Application Architecture – Client Side Scripting
versus Server-side Scripting – HTML5 – Headings – Linking – Images– Special Characters
and Horizontal Rules – Lists – Tables – Forms – Internal Linking – meta Elements – Form
input Types – input and datalist Elements – Page-Structure Elements.
TEXT BOOKS:
1. Roger S. Pressman, “Software Engineering: A Practitioner‘s Approach”,
McGraw Hill International Edition, Ninth Edition, 2020.
2. Scott Chacon, Ben Straub, “Pro GIT”, Apress Publisher, 3rd Edition, 2014.
3. Deitel and Deitel and Nieto, “Internet and World Wide Web - How to
Program”, Pearson, 5th Edition, 2018.
REFERENCES:
1. Roman Pichler, “Agile Product Management with Scrum Creating Products
that
CO5 Develop web pages using Java script with event-handling mechanism K6
K6 Evaluation
K5 Synthesis
K4 Analysis
K3 Application
K2 Comprehension
K1 Knowledge
6. CO – PO /PSO Mapping Matrix
CO1 1 3 3 3 1 1 1 - - 2 1 2 1 - - -
CO2 2 3 2 3 1 2 1 - - 2 1 2 1 - - -
CO3 3 3 3 3 1 2 1 - 1 2 1 2 1 - - -
CO4 4 3 3 3 1 2 1 - - 2 1 2 1 - - -
CO5 5 3 3 3 1 2 1 - - 2 1 2 1 - - -
7. LECTURE PLAN : UNIT – IV
JAVASCRIPTS
UNIT – I I HTML
Highest
Proposed Actual Cognitive
S. Lecture Lecture Level Mode of Delivery
Topic CO LU Outcomes Remark
No Date Date Delivery Resources
MD1,MD4
2 Memory Concepts – Arithmetic T3
05.01.2023 01.12.2022 K6 & Memory Concepts – Arithmetic
MD5
MD1,MD4
Decision Making: Equality and & Decision Making: Equality and
06.01.2023 01.12.2022 K6 MD5
3 Relational Operators T3 Relational Operators
CO6 MD1,MD4
4 JavaScript Control Statements T3
06.01.2023 01.12.2022 K6 & JavaScript Control Statements
MD5
13
8. Activity Based Learning: UNIT IV
Lecture Notes – Unit 4
JAVASCRIPT BASICS
Unit 4 -JAVASCRIPT BASICS
A script or scripting language is a computer language that does not need the
compilation step and is rather interpreted line by line at runtime. Scripts are programs
with instructions that are often utilized to create dynamic web pages and web
applications.
These scripting languages are often developed with the goal of communicating with other
programming languages.
What is JavaScript?
JavaScript is used mainly for enhancing the interaction of a user with the
webpage. JavaScript is also being used widely in game development and Mobile
application development.
JavaScript was developed by Brendan Eich in 1995. The language was initially
named as Mocha then was renamed as LiveScript which was later renamed JavaScript to
leverage the popularity of Java.
Note:
• JavaScript can be run on any operating systems and almost all web browsers.
• You need a text editor to write JavaScript code and a browser to display your web
page.
Introduction to JavaScript:
• JavaScript is a powerful programming language that can add interactivity to a website
• JavaScript is versatile, beginner-friendly, compact and very flexible
c. Third party frameworks and libraries that you can apply to HTML to
accelerate the work of building sites and applications. Frameworks and libraries are
blocks of code developed by third parties that help solve common problems in a
particular programming language.
a. Client side JavaScript supply object to control the browser and its Document
Object Model (DOM). For example, client side extensions allow an application to place
elements on an HTML form and respond to user events such as mouse clicks, form
input and page navigation. It is simply running scripts on the client device, usually
within a browser.
Internal JS: We can add JavaScript directly to your HTML file by writing the code
inside the <script> tag. The <script> tag can either be placed inside the <head> or
the <body> tag according to the requirement
External JS: We can write JavaScript code in other file having an extension.js and
then link this file inside the <head> tag of the HTML file in which we want to add this
code.
4.2 OBTAINING USER INPUT:
To create a dynamic web page, we need to obtain the users’ input dynamically
at run time and display it on the page created. A dynamic web page displays
different content for different users while retaining the same layout and
design.
JavaScript is a special from few other languages because it can accept input and
produce output on the basis of the user’s input in the same page. This means, we don’t
have to move to the next page or refresh or reload the page to see the output.
In JavaScript, there are different in built functions to get the inputs from the
user. They are:
Built In Function Names Functionalities
prompt(), readLine(prompt msg) Reads a string input from the user.
In this topic we will discuss about the basic elements required for constructing a
basic program in JavaScript.
1. Whitespace Characters:
Characters that provide space between other characters are referred to as whitespace
characters. Some of the white space characters are:
• Carriage return - moves the cursor to the beginning of the line without advancing
to the next line (tag used for CR representation - \r)
• Space
• Tab
• Newline
2. Statements:
console.log(message); //Statement 2
3. Blocks:
A block is a collection of one or more simple statements enclosed within a pair of curly
braces {}.
If(condition)
Eg: {
// Block of code
}
4. Identifiers:
• An identifier name starts with a letter (a-z, or A-Z), an underscore(_), or a dollar sign
($) and is followed by a sequence of characters including (a-z, A-Z), numbers (0-9),
underscores (_), and dollar signs ($).
• Identifiers are case-sensitive. For example, the message is different from the
Message.
5. Comments:
Types:
JavaScript defines a list of reserved keywords that have specific uses. Therefore, you
cannot use the reserved keywords as identifiers or property names by rules..
4.2.2 VARIABLES:
Rules:
1. Before using a variable, you need to declare it. But you don’t need to specify the
variable’s type in the declaration like other static typed languages such as Java or C.
2. Variable names are case-sensitive. Eg: the message and Message are different
variables.
3. Variable names can only contain letters, numbers, underscores, or dollar signs
and cannot contain spaces. Also, variable names must begin with a letter, an
underscore (_) or a dollar sign ($).
1. windows.alert()
2. windows.status()
3. document.write()
4. document.writeln()
1. windows.alert():
This function shows the message in a small message box. The message box
contains a string and an OK button on it. If the user clicks on OK button then the message
box disappears. The message to be displayed has to be passed as a parameter to the
windows.alert() function.
Syntax:
windows.alert(messsage);
Example:
Output:
2. windows.status():
This function shows the message in the status bar. The message to be displayed has
to be passed as a parameter to the windows.status() function.
Syntax:
windows.status(message);
Example:
Output:
The above code displays a message “Welcome to JS” in the status bar.
3. document.write():
Syntax:
document.write(message);
Example:
Output:
4. document.writeln():
Syntax:
document.writeln(message);
Example:
Output:
1. window.prompt()
2. window.confirm()
1. window.prompt():
This function is used to get any value from the user. This function takes two optional
parameters. It either returns the “value” entered by the user in the “string format” or
returns “null” if the user clicks on “cancel”.
Syntax:
Example:
Output:
2. window.confirm():
This function prompts the user to confirm the decision with either true or false.
Its shows a message box with two buttons “OK” AND “CANCEL” on it. If the user
clicks on “OK” then it returns “true” else if the user clicks on “CANCEL” then it returns
“false”.
Syntax:
Example:
Output:
Variable names such as pno1, pno2 and sum actually correspond to locations in the
computer’s memory. Every variable has a name, a type, and a value.
Explanation:
In the Addition of Integers script, the strings sno1 and sno2 are converted to integer and
are placed into the memory locations which are named as pno1 and pno2 by the
interpreter. Now these two integer values are added and the resultant value is placed into
a variable sum.
Output:
Datatypes in JavaScript:
A data type in any language defines the type of data a variable can hold. There
are six primitive datatypes such as Number, String, Boolean, NULL, Undefined and Symbol
and one non-primitive data type, ‘object’. (Non-primitive data types can be created or
modified by programmers.)
Note:
2. When a variable is declared in JavaScript, but is not given a value, the variable is
typed as an Undefined because it has an undefined value.
var x; Output:
console.log(x); undefined
document.write(typeof x); undefined
3. Assigning the value null to a variable indicates that this variable does not contain a
value. This means the type of a null value is an object, not null.
Operators are symbols that instructs the compiler to perform specific operations on two or
more operands(data/value). The operators prominently do two things. They are:
Remainder Operator:
The modulo operator (%) is used for calculating the remainder value of two operands
after division. In the expression a%b, if the value of a is greater than be then it displays
the remainder value after division (Eg. 17%5 = 2) but if the value of a is less than b, the
it displays the value of a as the remainder (Eg. 5%17 = 5)
Parentheses () are used to group expressions in the same manner as in algebraic
expressions (Eg. a*(b%c))
Output:
Program:
The Decision-making operators allows a script to make a decision based on the truth and
falsity of a condition. If the condition is met, the statements in the body of the if statement
is executed. If the condition is not met, the statement in the body of the else is executed.
There is no semicolon (;) at the end of the first line of each if statement. Including such a
semicolon is actually a logical error at the execution time.
if(hour<12);
document. write(“Good Morning “);
if(hour<12)
;
document. write(“Good Morning“);
where the semicolon on a separate line is called as the empty statement. The empty
statement gets executed if the if condition is true or false. That is, when an empty
statement executes, no task is performed in the script.
Output: Good Morning
Program:
Output:
Note:
The Date object – Contains the information about the local time in its getHours() method.
The time ranges from 0 to 23.
Syntax:
var date = new Date();
var time = date.getHours();
Conditional Operator:
Syntax:
Condition ? value1 : value2
Program:
Output:
Assignment Operator:
The Assignment operator is used to assign the value of right-hand operands to its left-hand
operand. That is if a = b+c assigns the value of b+c to a.
Program:
Input:
Output:
Program:
Output:
The JavaScript Increment and Decrement Operators useful to increase or decrease the
value by 1. For instance, Incremental operator ++ used to increase the existing variable
value by 1 (x = x + 1). The decrement operator – – is used to decrease or subtract the
existing value by 1 (x = x – 1).
The syntax for both the increment and decrement operators in JavaScript is
Note: When ++ or - - is used before operand like: ++x, –x then we call it as prefix and if
++ or - - is used after the operand like: x++ or x– then we called it as postfix.
Program:
Output:
Logical Operators:
The logical operators are used to compare and test more than two conditions.
Operator Name Symbol Function
Logical AND && Returns true, when all the conditions are true
Logical OR || Returns true, when atleast one condition of all the
conditions is true.
Logical NOT ! Returns true, if the condition evaluated is false.
Program:
Output:
The if-else statement is used to execute a block of JavaScript code, if the condition tested
results true. But if the condition tested results false, then the else block of the code is
executed.
Syntax:
if (condition)
{
// if Block of JavaScript code
}
else
{
// else Block of JavaScript code
}
Example:
Output:
Input 1:
Input 2:
Output:
Input 1:
Input 2:
4.6.1.4 Switch Statements:
The switch statement is used to execute one block of many blocks of code.
Syntax: Example:
switch(expression)
{
case x:
// code block
break;
case y:
// code block
break;
default:
// code block
}
4.6.2 LOOPS IN JAVASCRIPT
For example, suppose we want to print “Hello World” 10 times. This can be done in
two ways as shown below:
<script type="text/javascript">
document.write("Hello World<br>");
document.write("Hello World<br>");
document.write("Hello World<br>");
document.write("Hello World<br>");
document.write("Hello World<br>");
document.write("Hello World<br>");
document.write("Hello World<br>");
document.write("Hello World<br>");
document.write("Hello World<br>");
document.write("Hello World<br>");
</script>
Using Loops: In Loop, the statement needs to be written only once and the loop will
be executed 10 times as shown below:
<script type="text/javascript">
for (let i = 0; i < 10; i++)
{
document.write("Hello World!<br>");
}
</script>
There are mainly two types of loops:
Entry Controlled loops: In these types of loops, the test condition is tested before
entering the loop body. For Loops and While Loops are entry-controlled loops.
Exit Controlled loops: In these types of loops the test condition is tested or
evaluated at the end of the loop body. Therefore, the loop body will execute at least
once, irrespective of whether the test condition is true or false. The do-while loop is
exit controlled loop.
4.6.2.1 WHILE LOOP: A while loop is a control flow statement that allows code to
be executed repeatedly based on a given Boolean condition. The while loop can be
thought of as a repeating if statement.
Syntax :
while (boolean condition)
{
loop statements...
}
When the condition becomes false, the loop terminates which marks the
end of its life cycle.
4.6.2.2 FOR LOOP: for loop provides a concise way of writing the loop structure.
Unlike a while loop, a for statement consumes the initialization, condition,
and increment/decrement in one line thereby providing a shorter, easy-to-debug
structure of looping.
Syntax:
statement(s)
Initialization condition: Here, we initialize the variable in use. It marks the start of
a for loop. An already declared variable can be used or a variable can be declared,
local to loop only.
Testing Condition: It is used for testing the exit condition for a loop. It must return
a boolean value. It is also an Entry Control Loop as the condition is checked prior to
the execution of the loop statements.
Increment/ Decrement: It is used for updating the variable for the next iteration.
Loop termination: When the condition becomes false, the loop terminates marking
the end of its life cycle.
VAR vs LET
The difference between let and var is in the scope of the variables they create:
Variables declared by let are only available inside the block where they're defined.
Variables declared by var are available throughout the function in which they're
declared.
<!DOCTYPE html>
<html>
<body>
<script>
let text = "";
for (let i = 0; i < 5; i++) {
text += "The number is " + i + "<br>";
}
document.writeln(text);
</script>
</body>
</html>
OUTPUT:
DO-WHILE: The do-while loop is similar to the while loop with the only difference
that it checks for the condition after executing the statements, and therefore is an
example of an Exit Control Loop.
Syntax:
do
{
statements..
}
while (condition);
The do-while loop starts with the execution of the statement(s). There is no
checking of any condition for the first time.
After the execution of the statements, and update of the variable value, the
condition is checked for a true or false value. If it is evaluated to be true, the next
iteration of the loop starts.
When the condition becomes false, the loop terminates which marks the end of
its life cycle.
It is important to note that the do-while loop will execute its statements at least
once before any condition is checked, and therefore is an example of the exit control
loop.
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript for Do While Loop</h2>
<p id="demo"></p>
<script>
let count = 0;
do {
console.log(count);
count++;
document.writeln(count);
} while (count < 5)
</script>
</body>
4.6.3 JUMP STATEMENT IN JAVASCRIPT
Jump statements can jump out of the branch, loop, or statement returned from a
function call.
4.6.3.1 BREAK The statement is used to exit the loop or switch statement. The
syntax is as follows.
break;
[Example 1] In the following example, set the loop expression of the while
statement to always be true (while can convert the value 1 to true). Then set an if
statement in the while loop structure to judge that when the variable i is greater than
50, then jump out of the while loop body.
var i=0;
while(1){
if(i>50)
break;
i++;
document.write(i);
[Example 2] Jump statements can also be used in conjunction with tags to achieve
jumps to specified lines instead of just jumping out of the loop body. In the following
nested for loop body, define a mark x in the outer for statement, and then use the if
statement to set in the inner for statement: When a is greater than 5, the outer for
statement is jumped out, and the result is as follows:
for(var b=1;b<10;b++){
if (a> 5)
document.write(b);
}
CONTINUE
The continue statement stops the current iteration of loop and begins to
execute the next iteration of the loop.
It has the following syntax:
continue;
The continue statement used without label terminates the current iteration
of immediately enclosing loop. Whereas using continue with a label inside nested
loops it terminates the current iteration of loop identified with that label.
for (var i = 1; i <= 10; i++)
{
if (i % 2 === 0) {
continue;
}
console.log(i);
}
In the example above, even numbers are skipped and only the odd numbers are
displayed.
===============================================
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript break</h2>
<p id="demo"></p>
<script>
x: for (a = 1; a <10; a ++) {// Add label
document.write("<br />"+a+"<br />");
for(var b=1;b<10;b++){
if (a> 5)
break x; // If a is greater than 5, jump out of the label
document.write(b);
}
}
</script>
</body>
</html>
4.7 FUNCTIONS IN JavaScript:
Functions in JavaScript is used to develop and maintain a larger program by dividing it into
smaller simple blocks of code or modules. These smaller blocks of code are called as
functions. These functions are designed to perform a specific task when it is been
invoked(called).
There are three ways to return control to the point at which a function was invoked.
(i) If the function does not return a result, control returns when the program reaches the
function-ending right brace or by executing the statement
return;
return expression;
(iii)When a return statement is executed, control returns immediately to the point at which
the function was invoked.
The code inside the function will execute when "something" invokes (calls) the function:
Function arguments are listed inside the parentheses () in the function call. These values
are received by the function definition when it is invoked.
Syntax:
Function Definition:
function name(parameter1,parameter2,parameter3)
{
// code to be executed
}
Function Call:
name(argument1, argument2);
There are 3 ways of writing a function in JavaScript:
• Function Declaration
• Function Expression
• Arrow Function
1. Function Declaration: Function Declaration is the traditional way to define a
function. It is somehow similar to the way we define a function in other programming
languages. We start declaring using the keyword “function”. Then we write the function
name and then parameters.
After defining a function, we call it whenever the function is required.
Output:
Here, the whole function is an expression and the returned value is stored in the variable.
We use the variable name to call the function.
3. Arrow Functions: Arrow functions are been introduced in the ES6 version of
JavaScript. It is used to shorten the code. Here we do not use the “function” keyword
and use the arrow symbol.
Output:
Input:
Output:
4.7.3 Scope Rules:
Identifiers are names given to the user-defined functions are variables. Each
identifier in a program has a specific scope. The scope of an identifier for a variable or
function is the portion of the program in which the identifier can be referenced. There are
two types of Scope for any variable or a function in a program. They are:
• Global Scope
• Local Scope
Output:
4.7.3.2 Local Scope:
Identifiers declared inside a function have functional (or local) scope and can be used only
in that function. That is, Local variables cannot be accessed or modified outside the
function definition.
Note: If a local variable in a function has the same name as a global variable, the global
variable is “hidden” from the body of the function.
Program:
Output:
Points to Remember:
1. JavaScript has global scope and local scope.
2. Variables declared and initialized outside any function become global variables.
3. Variables declared and initialized inside function becomes local variables to that
function.
4. Variables declared without var keyword inside any function becomes global
variables automatically.
5. Global variables can be accessed and modified anywhere in the program.
6. Local variables cannot be accessed outside the function declaration.
7. JavaScript does not allow block level scope inside { } brackets.
8. If a local variable in a function has the same name as a global variable, the global
variable is “hidden” from the body of the function.
A recursive function can receive two inputs: a base case (ends recursion) or a
recursive case (resumes recursion). The recursion step normally includes the keyword
return, to return back the result to combine with the portion of the original problem until
the base case is reached.
Program:
Execution Flow:
3! •3*2=6
2! •2*1=2
1! •1
0!
Output:
A set of instructions
Definition Function calls itself. repeatedly executed.
Here, you need to create instance of array by passing arguments in constructor so that we
don't have to provide value explicitly.
Output:
Pass by value in JavaScript means that a copy of the actual parameter’s value is
made in memory i.e., a new memory allocation is done, and all the changes are made in
that new value (i.e., copied value).
The original value and the copied value are independent of each other as they
both have a different space in memory i.e., on changing the value inside the
function, the variable outside the function is not affected.
The original value and the copied value are independent of each other as they
both have a different space in memory i.e., on changing the value inside the function, the
variable outside the function is not affected.
Pass by value in JavaScript requires more space as the functions get a copy of
the actual content therefore, a new variable is created in the memory.
In this concept, equals operator plays a big role. When we create a variable, the
equals operator notices whether you are assigning that variable a primitive or non-
primitive value and then works accordingly.
Note: When we use the = operator, there is a function call (behind the scenes) where pass
by value (or reference) in JavaScript is done.
Program: Output:
It does not create a copy, instead, it works on the original variable, so all the
changes made inside the function affect the original variable as well.
Program: Output:
Program:
Output:
The spread syntax is used in place where zero or more arguments are expected. It
can be used with iterators that expands in place where there may not be a fixed number of
expected arguments (like function parameters).
Program:
Output:
Here, we use the arguments object to pass the names array to displyName()
function. We can pass the entire array to the function as an argument to simplify the code.
Program:
Output:
Method 1:
var arr1 = ["ABC", 24, 18000];
var arr2 = ["EFG", 30, 30000];
var arr3 = ["IJK", 28, 41000];
var arr4 = ["EFG", 31, 28000];
var arr5 = ["EFG", 29, 35000];
// "salary" defines like a 1D array but it already contains some 1D array
var salary = [arr1, arr2, arr3, arr4, arr5];
Method 2:
var salary = [
["ABC", 24, 18000],
["EFG", 30, 30000],
["IJK", 28, 41000],
["EFG", 31, 28000],
];
Print the Elements in the Multi-dimensional Array:
Example:
Output:
</script>
Output:
10. Assignments : UNIT IV
(CO5,K6)
o It is an open-source platform that helps the users to view and edit the script
when required as per their requirement.
JavaScript was developed by Brendan Eich in 1995. The language was initially
named as Mocha then was renamed as LiveScript which was later renamed JavaScript to
leverage the popularity of Java.
4. What are the built-in functions available in JS to get inputs from user? (CO5,
K6)
Built In Function Names Functionalities
typeOf variable name Used to return the type the value stored
in the variable.
5. What are Whitespace Characters in JS? (CO5, K6)
Characters that provide space between other characters are referred to as whitespace
characters. Some of the white space characters are:
• Carriage return - moves the cursor to the beginning of the line without advancing
to the next line (tag used for CR representation - \r)
• Space
• Tab
• Newline
Eg:
console.log(message); //Statement 2
• Identifiers are case-sensitive. For example, the message is different from the
Message.
8. What are the rules for creating variables in JS? (CO5, K6)
1. Before using a variable, you need to declare it. But you don’t need to specify the
variable’s type in the declaration like other static typed languages such as Java or C.
2. Variable names are case-sensitive. Eg: the message and Message are different variables.
3. Variable names can only contain letters, numbers, underscores, or dollar signs and
cannot contain spaces. Also, variable names must begin with a letter, an underscore (_) or
a dollar sign ($).
10. List down the functions to get inputs from user. (CO5, K6)
a. window.prompt()
b. window.confirm()
13. List the two types of Decision-making operators in JavaScript. (CO5, K6)
i. Equality Operators (==,!=, ===,!==)
ii. Relational Operators (>,<,>=,<=)
14. What is conditional operator? What is its syntax? (CO5, K6)
The Conditional operator is a ternary operator which takes 3 operands, a condition to be
evaluated and 2 alternative values to be returned based on the truth and falsity of the
condition.
Syntax: Condition ? value1 : value2
15. What is meant by Increment and Decrement Operator? (CO5, K6)
16. List down the types of control statements in JavaScript. (CO5, K6)
i. Decision Making Statements.
ii. Looping or Iterative Statements.
iii. Jump Statements.
A set of instructions
Definition Function calls itself. repeatedly executed.
i. By array literal
Q. Questions CO K Level
No. Level
UNIT IV
Sl. Courses Platform
No.
1 JavaScript for Beginners Coursera
2 JavaScript Part I NPTEL
3 Complete JavaScript Course - Beginner to Professional Udemy
14. REAL TIME APPLICATIONS : UNIT IV
Hands-on-Exercise
1. Whip-up gift boxes
2. Chronometer
3. Theme Clock
4. Numberates Game
5. My Tasks
6. Event Handling
7. Form Validations
Art
A recent feature of HTML5 in JavaScript is the canvas element, which allows drawing
2D and 3D graphics easily on a web page. This has helped open doors for various
digital art projects on the browser. Become a digital artist, creating your own code of
art using JavaScript.
Flying Robots
Last but not least, you can use JavaScript to program a flying robot. With the Node.js
ecosystem, users can control numerous small robots, creative maker projects, and IoT
devices. Step into the exciting world of drones, flying robots, and quadcopters with
JavaScript.
Games
Creating games on the web is another important one among applications of JavaScript.
The combination of JavaScript and HTML5 plays a major role in games development
using JS. The EaselJS library provides rich graphics for games. HTML5 provides total
access to the web without additional plugins like Flash. Complex browser games Tower
Building, CrossCode, HexGL game are based on JavaScript and HTML5.
15. Content Beyond Syllabus
JavaScript - Page Printing
JavaScript helps you to implement this functionality using the print function of
window object.
The JavaScript print function window.print() prints the current web page when
executed. You can call this function directly using the onclick event as shown
in the following example.
Output
2 Scott Chacon, Ben Straub, “Pro GIT”, Apress Publisher, 3rd Text Book
Edition, 2014.
3 Deitel and Deitel and Nieto, “Internet and World Wide Web - Text Book
How to Program”, Pearson, 5th Edition, 2018.
3. Online shopping
6. Library management
7. Hospital management
Disclaimer:
This document is confidential and intended solely for the educational purpose of RMK Group of
Educational Institutions. If you have received this document through email in error, please notify the
system manager. This document contains proprietary information and is intended only to the
respective group / learning community as intended. If you are not the addressee you should not
disseminate, distribute or copy through e-mail. Please notify the sender immediately by e-mail if you
have received this document by mistake and delete this document from your system. If you are not
the intended recipient you are notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this information is strictly prohibited.