JavaScript Review - If/else, switch-case, loops, loop control, functions

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

return statement

A JavaScript function can have an optional ____________________________________. This statement should be the last statement in a function.

function

A ___________________ is a group of reusable code that can be called anywhere in your program.

parenthesis

If a function has parameters, they will be located inside the ______________________ located after the name of the function.

if-else statement

If the resulting value is true, the given statement(s) in the 'if' block, are executed. If the expression is false, then the given statement(s) in the else block are executed.

break

In a switch statement, the ______________ statements indicate the end of a particular case. If they were omitted, the interpreter would continue executing each statement in each of the following cases.

case

In a switch statement, the interpreter checks each _____________ against the value of the expression until a match is found. If nothing matches, a default condition will be used.

break statement

In loop control, the ________________ is used to exit a loop early, breaking out of the enclosing curly braces.

switch statement

Instead of using multiple if...else...if statements, it is usually better, and much more efficient to us this: ______________________________

if statement if...else statement if...else if... statement

JavaScript supports the following 3 forms of if...else statements:

continue statement

Loop control associated with "pause" or "skip"

break statement

Loop control associated with "stop"

compact

The 'for' loop is the most __________________ form of looping.

loop initialization test statement iteration statement

The For Loop includes the following three important parts: ____________ ______________ _____________ You can put all the three parts in a single line separated by semicolons.

for...in loop

The __________________ is used to loop through an object's properties.

most basic loop

The ____________________ in JavaScript is the while loop.

continue statement

The _________________________ tells the interpreter to immediately start the next iteration of the loop and skip the remaining code block.

do...while loop; false

The _____________________________ is similar to the while loop except that the condition check happens at the end of the loop. This means that the loop will always be executed at least once, even if the condition is _____________________.

if..else statements

These are conditional statements which are used to perform different actions based on different conditions.

if-else-if statement

This is just a series of if statements, where each if is a part of the else clause of the previous statement. Statement(s) are executed based on the true condition, if none of the conditions is true, then the else block is executed.

called; invoked

To execute a function it must be ______________ or __________________.

label

Used in loop control, A __________ is simply an identifier followed by a colon (:) that is applied to a statement or a block of code.

Function() constructor

You can define your function dynamically using ________________________________ along with the "new" operator.

small; manageable

The main benefit of a function is that it allows a programmer to divide a big program into a number of __________________ and ___________________ functions.

while loop

The purpose of a ____________________ is to execute a statement or code block repeatedly as long as an expression is true. Once the expression becomes false, the loop terminates.

value

The return statement is required if you want to return a ____________________ from a function.

'if' statement

The________________ is the fundamental control statement that allows JavaScript to make decisions and execute statements conditionally. If the statement is true, the given statement in the "if" block is executed.


संबंधित स्टडी सेट्स

Management Exam 3- Human Resources

View Set

Craven Ch 16: Caring for the Older Adult

View Set

Med Surg: Chapter 46: Nursing Management: Patients With Neurologic Disorders: PREPU

View Set

Haz Mat chemical properties and hazardous materials behavior

View Set

Chapter 6: Values, ethics, and advocacy PREPU

View Set

LP3 Chapter 12 Orthopedic disorders

View Set