MCA Java Script Unit 2 Control Statements
MCA Java Script Unit 2 Control Statements
Control
Statements
SELF LEARNING MATERIAL
MCA
UNIT-2 CONTROL STATEMENTS
TABLE OF CONTENTS
2.1 Introduction
2.2 Controlling the Flow
2.2.1 JavaScript Control Statements
2.3 Functions
2.3.1 Parameters and working
2.4 The Window Object
2.4.1 Dialog Boxes
2.4.2 Window function
2.5 Let’s Sum Up
2.6 Case Study
2.7 Terminal Questions
2.8 Answers
2.9 Assignment
2.10 References
Learning Objectives
• To understand the controlling the flow, and various JavaScript control
statements.
• To demonstrate the ability to define functions in JavaScript to encapsulate
reusable blocks of code.
• To describe the window objects like dialog boxes, and window functions.
NOTES
2.1
Introduction
Understanding the complexities of JavaScript is critical in the world of
web development for creating dynamic and interactive experiences. The
fundamentals of regulating the flow of execution and arranging functionality
through functions are central to JavaScript, as is utilizing the browser
environment using the Window object.
01
NOTES The Window Object serves as a conduit for JavaScript to communicate
with the browser environment. Developers may use this object to access
and control many components of the browser window, allowing for dynamic
behavior and user interaction. Dialog boxes, a subset of the Window Object,
provide a mechanism of engaging with users via prompts, notifications, and
confirmations, increasing the interactivity and usability of online applications.
2.2
Controlling the Flow
Controlling the flow of execution is an essential
part of programming because it allows developers STUDY NOTE
to specify the order in which statements are Switch statements
performed depending on specified circumstances can be up to 20 times
or criteria. Controlling the flow of JavaScript is faster than equivalent
accomplished via different control statements, if-else if chains in
which allow developers to make decisions, run JavaScript, especially
iterations, and execute code blocks conditionally. when dealing with large
This section examines JavaScript control numbers of conditions.
statements in detail, explaining their syntax, use, This performance
and relevance in program logic. improvement can
significantly impact
2.2.1. JavaScript Control Statements:
the execution time of
Conditional Statements: applications and improve
Conditional statements in JavaScript are useful overall efficiency.
for directing the flow of execution depending
on certain criteria. These statements enable developers to write dynamic and
responsive code by running various blocks of code based on whether or not
specific conditions are fulfilled. Let’s go at the intricacies of the basic conditional
statements in JavaScript.
02
Conditional Statements NOTES
if Statement
else Statement
else if Statement
● if Statement:
The if statement is the most basic conditional statement in JavaScript. It
evaluates a condition and executes a block of code if the condition is true. If the
condition is false, the code inside the if block is skipped.
Syntax:
if (condition) {
// code block to be executed if condition is true
}
Example:
let x = 10;
if (x > 5) {
[Link](“x is greater than 5”);
}
In this example, if the value of x is greater than 5, the message “x is greater
than 5” will be printed to the console.
● else Statement:
The else statement is used in conjunction with the if statement to execute a
block of code when the if condition evaluates to false.
Syntax:
if (condition) {
// code block to be executed if condition is true
} else {
// code block to be executed if condition is false
}
Example:
let x = 3;
if (x > 5) {
[Link](“x is greater than 5”);
} else {
[Link](“x is not greater than 5”);
}
03
NOTES In this example, since the value of x is not greater than 5, the message “x is not
greater than 5” will be printed.
● else if Statement:
The else if statement allows for the evaluation of multiple conditions. It follows
an if statement and executes a block of code if the preceding conditions are
false and the current condition is true.
Syntax:
if (condition1) {
// code block to be executed if condition1 is true
} else if (condition2) {
// code block to be executed if condition2 is true
} else {
// code block to be executed if none of the conditions
are true
}
Example:
let x = 7;
if (x > 10) {
[Link](“x is greater than 10”);
} else if (x > 5) {
[Link](“x is greater than 5 but not greater than 10”);
} else {
[Link](“x is less than or equal to 5”);
}
In this case, because x is more than 5 but not greater than 10, the message “x is
greater than 5 but not greater than 10” will be written.
Looping Statements:
Looping statements in JavaScript allow you to execute a piece of code repeatedly,
either for a set number of iterations or until a certain condition is fulfilled. They are
crucial for automating repetitive processes, analyzing large amounts of data, and
executing iterative procedures.
04
Syntax:
NOTES
for (initialization; condition; increment/decrement) {
// code block to be executed repeatedly
}
Example:
for (let i = 0; i < 5; i++) {
[Link](i);
}
In this example, the loop will iterate five times, with the value of i ranging from
0 to 4. The [Link](i) statement will print each value of i to the console.
● while Loop:
The while loop executes a block of code as long as the specified condition
evaluates to true. It is useful when the number of iterations is not known in
advance.
Syntax:
while (condition) {
// code block to be executed while condition is true
}
Example:
let i = 0;
while (i < 5) {
[Link](i);
i++;
}
In this example, the loop will continue to execute as long as the value of i is
less than 5. The [Link](i) statement will print the current value of i to the
console during each iteration.
● do...while Loop:
The do...while loop is similar to the while loop but ensures that the block of
code is executed at least once before the condition is evaluated. It is useful
when you want to guarantee that the loop body executes at least once.
Syntax:
do {
// code block to be executed at least once
} while (condition);
Example:
let i = 0;
do {
[Link](i);
i++;
} while (i < 5);
05
NOTES In this example, the loop will execute once regardless of the value of i, and then
continue to execute as long as the condition i < 5 is true.
However, it is critical to ensure that looping criteria are appropriately stated to avoid
infinite loops, which can lead to performance concerns and browser crashes. With
a good grasp of looping statements, developers may create strong and responsive
JavaScript apps that can handle a wide range of computing tasks.
Activity
Students will analyse real-world scenarios where conditional statements are
crucial in JavaScript applications. They will identify examples from popular
websites or applications and dissect the logic behind the conditional statements
used. Through code inspection and discussion, students will evaluate the
effectiveness of these conditional statements in achieving specific functionalities
or user interactions. This activity will deepen their understanding of conditional
logic and its practical application in web development.
2.3
Functions
Functions are an important concept in JavaScript because they allow developers
to encapsulate reusable pieces of code and structure their systems into logical,
modular components. By designing functions, developers may increase code
readability, maintainability, and reusability. Let’s look at the intricacies of JavaScript
function:
06
● Function Declaration:
NOTES
In JavaScript, a function is declared using the function keyword, followed by
the function’s name, a list of arguments contained in parentheses (if any), and
the code block surrounded in curly brackets.
Syntax:
function functionName(parameter1, parameter2, ...) {
// code block
}
Example:
function greet(name) {
[Link](“Hello, “ + name + “!”);
}
In this example, the function’s name is greet, and the argument is name. The
function body includes the code block that will be executed when the function
is invoked.
● Function Invocation:
To execute a function and run the code within its body, invoke or call it using
its name followed by parentheses. If the function has parameters, you supply
arguments to it in the parenthesis.
Syntax:
functionName(argument1, argument2, ...);
Example:
greet(“John”);
This invocation of the greet function with the argument “John” will print “Hello,
John!” to the console.
● Function Parameters:
Parameters are placeholders for the values that a function need to complete its
purpose. They are defined in the function declaration and act as variables inside
the function’s scope. When you call a function, you send values, or arguments,
to these parameters.
Example:
function multiply(x, y) {
return x * y;
}
let result = multiply(5, 3);
[Link](result); // Output: 15
In this example, x and y are the parameters of the multiply function, and 5 and
3 are the arguments supplied to them when the function is called.
● Return Statement:
JavaScript functions can optionally return a value using the return statement.
When a function comes across a return statement, it departs immediately and
returns the provided value to the caller.
07
NOTES Example:
function add(x, y) {
return x + y;
}
let sum = add(2, 3);
[Link](sum); // Output: 5
In this example, the add function returns the sum of its two parameters x and y.
● Function Expression:
In JavaScript, functions may also be defined using function expressions, which
attach a function to a variable. Function expressions may be anonymous or
named.
Example: STUDY NOTE
let multiply = function(x, y) { Functions in JavaScript
return x * y; are crucial for web
}; development, with
let result = multiply(4, 6); over 90% of websites
employing JavaScript
[Link](result); // Output: 24
functions to enhance
In this example, the multiply function is assigned interactivity and
to the variable multiply via a function expression. user experience.
This highlights
2.3.1. Parameters and working: their indispensable
In JavaScript, functions are reusable chunks of role in modern
code that may be invoked with various inputs, web development
known as arguments, to execute specified tasks. frameworks and
Understanding arguments and how they operate libraries.
is critical for successfully defining and using
JavaScript functions.
Defining Parameters
Parameter and working in
JavaScript Function
Passing Arguments
Default Parameters
Rest Parameters
08
● Defining Parameters:
NOTES
Parameters are placeholders for the values that a function expects to receive
when invoked. They are stated in parenthesis of a function declaration or
expression.
Syntax:
function functionName(parameter1, parameter2, ...) {
// code block
}
In the syntax above, parameter1, parameter2, etc., are the parameters of the
function functionName.
● Passing Arguments:
When calling a function, you pass values, known as arguments, for the
parameters specified in the function declaration. When the function is invoked,
it receives these parameters.
Syntax:
functionName(argument1, argument2, ...);
In the syntax above, argument1, argument2, etc., are the arguments passed to
the parameters of the functionName.
● Working with Parameters:
Inside the function body, arguments act similarly to variables. They can conduct
operations, calculations, or any other activities within the function’s scope.
Example:
function greet(name) {
[Link](“Hello, “ + name + “!”);
}
greet(“John”); // Output: Hello, John!
In this example, the greet function accepts an argument called name. When
the function is invoked with the input “John”, the parameter name takes the
value “John” in the function body.
● Default Parameters:
JavaScript allows you to provide default values for parameters if no argument
is sent to them during function invocation. This feature is important for
guaranteeing that a function acts reliably even when certain parameters are
missing.
Syntax:
function functionName(parameter1 = defaultValue1, parameter2
= defaultValue2, ...) {
// code block
}
09
NOTES Example:
function greet(name = “Anonymous”) {
[Link](“Hello, “ + name + “!”);
}
greet(); // Output: Hello, Anonymous!
greet(“John”); // Output: Hello, John!
In this example, if no argument is provided for the name parameter, it defaults
to “Anonymous”.
● Rest Parameters:
Rest parameters enable a function to receive an arbitrary amount of arguments
as an array. They are useful when the number of parameters provided to a
function is not known beforehand.
Syntax:
function functionName(...args) {
// code block
}
Example:
function sum(...numbers) {
let total = 0;
for (let num of numbers) {
total += num;
}
return total;
}
[Link](sum(1, 2, 3)); // Output: 6
[Link](sum(5, 10, 15, 20)); // Output: 50
In this example, numbers is a rest parameter that stores all of the parameters
supplied to the sum method in an array named numbers.
Understanding parameters and how they operate is critical for developing flexible
and reusable JavaScript methods. Developers who know parameter use may
construct functions that are adaptive to diverse contexts and requirements.
10
Activity
NOTES
Students will conduct a comparative analysis of function design patterns in
JavaScript by examining code snippets from various open-source projects. They
will investigate different approaches to function declaration, parameter usage,
and return values. Through this research-based activity, students will identify
common patterns, such as callback functions or immediately invoked function
expressions, and evaluate their strengths and weaknesses in terms of code
readability, maintainability, and performance.
2.4
The Window Object
In web development, the Window object
represents the browser window or tab in which STUDY NOTE
the web page is displayed. It serves as the The Window object
global object for JavaScript code running within is omnipresent in
the browser environment. The Window object JavaScript, with over
provides access to a wide range of properties, 95% of websites
methods, and events that enable developers utilizing its properties
to interact with the browser, manipulate the and methods for
document, and manage user interactions. manipulating browser
windows, controlling
Let’s explore the Window object in detail:
navigation, and
● Accessing the Window Object: managing user
The Window object is automatically created interactions.
by the browser and is globally accessible
in JavaScript code running within the browser environment. You can directly
access its properties and methods without any additional setup.
Example:
[Link]([Link]); // Output: Width of the
browser window
In this example, [Link] accesses the inner width of the browser
window.
● Properties of the Window Object:
The Window object provides a wide range of properties that represent various
aspects of the browser window and the browsing context.
11
NOTES Some commonly used properties include:
{ innerWidth and innerHeight: Width and height of the browser window’s content
area.
{ location: URL of the current web page.
{ document: Document object representing the content of the current web page.
{ navigator: Navigator object containing information about the browser.
{ localStorage and sessionStorage: Storage objects for storing data persistently
or temporarily.
Example:
[Link]([Link]); // Output: Current URL of
the web page
● Methods of the Window Object:
The Window object provides methods for performing various actions related
to the browser window, document manipulation, and interaction with the user.
12
● Alert Dialog Box:
NOTES
The alert dialog box displays a message to the user. It often includes a message
and an OK button. Alert dialogs are often used to convey information or
notifications to users.
Syntax:
[Link](message);
Example:
[Link](“This is an alert message!”);
● Confirm Dialog Box:
The confirm dialog box prompts the user to confirm or cancel an activity. It often
includes a message, as well as OK and Cancel buttons. Confirm dialogues are
frequently used to confirm actions before advancing.
Syntax:
[Link](message);
Example:
if ([Link](“Are you sure you want to delete this
item?”)) {
// Code to delete the item
} else {
// Code to handle cancelation
}
● Prompt Dialog Box:
This box prompts the user for input. It normally consists of a message, an input
form, and OK and Cancel buttons. Prompt dialogs are often used to collect user
input, such as text or numbers.
Syntax:
[Link](message, defaultValue);
Example:
let userInput = [Link](“Please enter your name:”, “John
Doe”);
[Link](“User entered: “ + userInput);
● Using Dialog Boxes Effectively:
{ Provide Clear Messages: Ensure that the message presented in the dialog
box is clear and helpful, allowing users to grasp the dialog’s purpose.
{ Handle user input: When utilizing prompt dialogs, verify and handle user
input effectively to maintain data integrity and avoid problems.
{ Confirm Critical Actions: Use confirm dialogs to confirm key activities with
serious effects, such as deleting data or executing irreversible procedures.
{ Consider Accessibility: When utilizing dialog boxes, keep accessibility
concerns in mind, such as ensuring that they are keyboard accessible and
offering alternate options for users who may not be able to interact with
dialog boxes using a mouse.
13
NOTES 2.4.2. Window function:
The Window function, commonly known as the global Window object method, is
a useful JavaScript utility for interacting with browser windows programmatically.
It enables developers to modify browser windows, control their attributes, and
conduct a variety of operations like as opening new windows, resizing existing
ones, and navigating between URLs.
Closing a Window
Resizing a Window
Navigating to a URL
14
Example:
NOTES
[Link]();
● Resizing a Window:
The Window function provides the resizeTo() method, which allows developers
to resize the current browser window to a specific width and height.
Syntax:
[Link](width, height);
Example:
[Link](800, 600);
● Navigating to a URL:
The Window function provides the location property, which allows developers
to navigate to a different URL within the current browser window.
Syntax:
[Link] = “[Link]
● Accessing Child Windows:
The Window function provides the ability to access child windows opened by
the open() method through their Window object references.
Example:
var childWindow = [Link](“[Link] “_blank”);
● Working with Parent and Opener Windows:
The Window function also provides properties such as parent, opener, and top, which
allow developers to access parent, opener, and top-level windows respectively.
Example:
var parentWindow = [Link];
var openerWindow = [Link];
var topLevelWindow = [Link];
In JavaScript, the Window function provides a variety of options for interacting with
browser windows and programmatically influencing their behavior. Developers may
design dynamic and interactive web apps that give users with a smooth browsing
experience by using methods such as open(), shut(), and resizeTo(), as well as
attributes such as location. Understanding how to utilize the Window function
efficiently is critical when developing modern web apps with sophisticated user
interfaces and functions.
15
NOTES Activity
Students will investigate the evolution of the Window object in JavaScript across
different browser versions. They will analyze documentation and release notes
from major browser vendors to identify changes, additions, or deprecations in
Window object properties and methods. Through comparative analysis, students
will assess the impact of these updates on web development practices and
compatibility across browsers. This research-based activity will deepen
students’ understanding of the Window object’s role in client-side scripting and
its adaptation to evolving web standards.
2.5
Let’s Sum Up
● JavaScript control statements dictate the flow of execution based on conditions
or loops.
● Functions in JavaScript encapsulate reusable blocks of code for better
organization and modularity.
● Parameters in JavaScript functions enable dynamic behavior by accepting
inputs during function invocation.
● The Window object in JavaScript provides access to browser-specific properties
and methods.
● Dialog boxes, such as alert, confirm, and prompt, facilitate user interaction
within browser windows.
● The Window function allows programmatic control over browser windows,
including opening, closing, and resizing.
● Control statements like if, else, and switch enable decision-making in JavaScript
programs.
● Looping statements like for, while, and do...while facilitate iterative execution
of code blocks.
● Functions with parameters allow for flexible and customizable behavior based
on input values.
● Dialog boxes are useful for displaying messages, confirming actions, and
gathering user input.
● The Window object’s properties include location, navigator, and document for
accessing browser information.
16
● The Window object’s methods include alert, confirm, and prompt for user
interaction.
NOTES
● Parameters in JavaScript functions serve as placeholders for data passed
during function invocation.
● The Window function’s open method is used to open new browser windows
or tabs.
● Control statements are fundamental for implementing logic and decision-
making in JavaScript programs.
● Functions enhance code reusability and maintainability by encapsulating logic
into reusable units.
● The Window object’s properties and methods allow manipulation of browser
windows and their behavior.
● Dialog boxes, like alert, display important messages to users in browser
windows.
● Looping statements, like for and while, enable repetitive execution of code
blocks in JavaScript.
● The Window function provides programmatic control over browser windows,
facilitating dynamic interactions within web applications.
2.6
Case Study
Problem:
Infosys faced challenges with outdated user interfaces and inefficient user
interactions on its web applications. The lack of dynamic content presentation
and interactive features led to a subpar user experience, resulting in reduced user
engagement and satisfaction.
Solution:
Infosys embarked on a comprehensive overhaul of its web applications, focusing
on integrating JavaScript functionalities to address the identified challenges. They
implemented the following solutions:
17
NOTES Implementing Control Statements:
Infosys developers utilized JavaScript control statements like if...else and switch to
introduce dynamic content rendering based on user preferences and interactions.
This allowed for personalized user experiences tailored to individual needs.
Outcome:
The integration of JavaScript functionalities significantly enhanced Infosys’s
web applications’ user experience. Users reported smoother navigation, clearer
communication, and increased interactivity, leading to higher engagement and
satisfaction levels. Infosys saw improvements in key metrics such as user retention,
conversion rates, and overall client satisfaction.
Questions:
1. What were the key challenges faced by Infosys during the implementation of
JavaScript functionalities, and how were they addressed?
2. What impact did the integration of JavaScript have on Infosys’s key performance
indicators and overall business objectives?
2.7
Terminal Questions
SHORT ANSWER QUESTIONS
1. How does the Window object in JavaScript serve as a bridge between client-
side scripting and browser manipulation, and what are its implications for web
development?
2. Analyze the purpose and significance of dialog boxes in JavaScript, considering
their impact on user interaction and interface design.
3. Evaluate the effectiveness of the open() method of the Window function in
JavaScript for managing browser windows and tabs, and discuss potential
security considerations.
18
LONG ANSWER QUESTIONS
NOTES
1. Evaluate the efficiency and performance implications of looping statements in
JavaScript, comparing the computational complexity of different loop structures
and analyzing their suitability for various programming tasks.
2. Critically assess the concept of scope in JavaScript functions, analyzing its
impact on variable visibility, memory management, and code maintainability.
Discuss common pitfalls and best practices for managing scope in JavaScript
applications.
3. Discuss the architectural considerations for choosing between local storage
and session storage in JavaScript, considering factors such as data persistence,
security, and performance.
MCQ QUESTIONS
1. Which of the following JavaScript features is used to control the flow of
program execution?
a) Functions
b) Parameters
c) Control statements
d) Dialog boxes
2. What are the primary types of looping statements in JavaScript?
a) for and while
b) if and else
c) switch and case
d) alert and confirm
3. How do functions enhance code organization and reusability in JavaScript?
a) By providing control statements
b) By allowing dynamic URL navigation
c) By encapsulating reusable code blocks
d) By resizing browser windows
4. Parameters in JavaScript functions serve what purpose?
a) They define the number of times a loop iterates
b) They specify conditions for executing code blocks
c) They enable dynamic behavior and flexibility
d) They control the flow of program execution
5. What does the Window object in JavaScript allow developers to access?
a) Database information
b) Browser window properties and methods
c) User input data
d) Server-side data
19
NOTES 6. Which of the following is an example of a dialog box in JavaScript?
a) for loop
b) while loop
c) alert
d) switch
7. How does the `open()` method of the Window function work?
a) It opens a new browser window or tab
b) It closes the current browser window
c) It resizes the browser window
d) It navigates to a new URL
8. What is the role of control statements in JavaScript?
a) To manipulate browser windows
b) To provide user input
c) To control the flow of program execution
d) To organize code into reusable blocks
9. How do parameters enable dynamic behavior in JavaScript functions?
a) By controlling the flow of program execution
b) By defining the number of iterations in a loop
c) By accepting inputs during function invocation
d) By manipulating browser windows
10. Which dialog box in JavaScript is used for confirming actions?
a) alert b) confirm
c) prompt d) open
2.8
Answers
CHECK YOUR PROGRESS
1. Control 6. False
2. if-else 7. User
3. True 8. Warning
4. Parameters 9. False
5. Flexible
MCQ Answers
1. c) Control statements
2. a) for and while
3. c) By encapsulating reusable code blocks
4. c) They enable dynamic behavior and flexibility
5. b) Browser window properties and methods
6. c) alert
7. a) It opens a new browser window or tab
8. c) To control the flow of program execution
9. c) By accepting inputs during function invocation
10. b) confirm
22
2.9 NOTES
Assignment
MULTIPLE CHOICE QUESTIONS
23
NOTES 7. How do looping statements contribute to iterative programming in JavaScript?
a) By allowing dynamic content rendering
b) By providing user interaction
c) By executing code repeatedly based on conditions
d) By controlling the flow of program execution
8. What is the primary purpose of parameters in JavaScript functions?
a) To specify conditions for executing code blocks
b) To manipulate browser windows
c) To enable dynamic behavior and flexibility
d) To store data locally
9. Which dialog box in JavaScript is used for gathering user input?
a) alert
b) confirm
c) prompt
d) open
10. How does the Window object contribute to browser manipulation in JavaScript?
a) By controlling the flow of program execution
b) By providing access to browser window properties and methods
c) By resizing browser windows
d) By storing data locally
11. Which of the following statements best describes the purpose of control
statements in JavaScript?
a) To manipulate browser windows
b) To provide user interaction
c) To control the logical flow of program execution
d) To organize code into reusable blocks
12. How do parameters enable dynamic behavior and flexibility in JavaScript
functions?
a) By defining the number of iterations in a loop
b) By accepting inputs during function invocation
c) By controlling the flow of program execution
d) By displaying messages to users
13. Which dialog box in JavaScript is used for confirming user actions before
proceeding?
a) alert
b) confirm
c) prompt
d) open
24
14. What property of the Window object allows navigation to a different URL?
NOTES
a) location
b) document
c) navigator
d) localStorage
15. What is the primary purpose of looping statements in JavaScript?
a) To display messages to users
b) To confirm user actions
c) To execute code repeatedly based on conditions
d) To prompt users for input
16. How do functions contribute to code modularity and maintainability in
JavaScript?
a) By providing user interaction
b) By allowing dynamic content rendering
c) By encapsulating reusable code blocks
d) By controlling the flow of program execution
17. Which of the following methods of the Window object is used to open a new
browser window or tab?
a) close()
b) resizeTo()
c) confirm()
d) open()
18. What is the primary purpose of dialog boxes in JavaScript?
a) To control the flow of program execution
b) To provide user interaction and feedback
c) To manipulate browser windows
d) To store data locally
19. Which parameter of the `open()` method of the Window function specifies
where to open the new window?
a) url
b) target
c) features
d) method
20. How do looping statements contribute to iterative programming in JavaScript?
a) By allowing dynamic content rendering
b) By providing user interaction
c) By executing code repeatedly based on conditions
d) By controlling the flow of program execution
25
NOTES QUESTIONS
1. Discuss the importance of error handling in JavaScript control statements, and
provide strategies for effectively managing and debugging errors.
2. How do looping statements in JavaScript, such as for and while, contribute to
iterative programming and algorithmic efficiency?
3. Explain the concept of scope in JavaScript functions, and analyze its implications
for variable accessibility and lifetime.
4. Discuss the differences between local storage and session storage in JavaScript,
and provide use cases where each storage mechanism would be more suitable.
5. Analyze the role of conditional statements in JavaScript control flow, and
provide examples of complex conditional logic in real-world applications.
2.10
References
Books:
● [Link]
cC?hl=en&gbpv=1&dq=javascript&printsec=frontcover
● [Link]
2weL0iAfrEMC?hl=en&gbpv=1&dq=javascript&printsec=frontcover
● [Link] wiJD
wAAQBAJ?hl=en&gbpv=1&dq=javascript&printsec=frontcover
● [Link]
Backend/qOV5EAAAQBAJ?hl=en&gbpv=1&dq=javascript&printsec=frontcover
● [Link]
nspbsekC?hl=en&gbpv=1&dq=javascript&printsec=frontcover
Webpages:
● [Link]
● [Link]
● [Link]
● [Link]
● [Link]
● h tt p s : / / d o c s . o r a c l e . c o m / j ava s e / tu t o r i a l / j ava / j ava OO / a r g u m e n t s .
html#:~:text=The%20parameters%20are%20used%20in,when%20the%20
method%20is%20invoked.
● [Link]
26