Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.Functions can be created by using the function keyword alone or by... using the new keyword. creating a variable since all variables are actually functions

1.Functions can be created by using the function keyword alone or by...

using the "new" keyword.
creating a variable since all variables are actually functions in JavaScript.
assigning a variable to be a function.

attaching the function to an object property.

2. n JavaScript, it is possible to have optional arguments if...

the code is running in strict mode.
the function is recursive.
you create the behavior in your function declaration.

using the keyword "optional".

3.

What kind of data can be passed into a function without changing the original value?

Only arrays and objects.
Primitive data types such as strings, booleans, and numbers.
Only numbers.

Any data can be passed into a function and will remain unchanged.

4.

Which of the following statements are NOT true of functions in JavaScript.

Functions can be defined inside other functions.
Functions do not have to have a return value.
Functions cannot be run without supplying the correct number of arguments.

Functions can be assigned to variables.

5.

In JavaScript a function can be called...

above where it is defined in the code.
only when it provides a return value.
only from the global scope.

only with the proper number of arguments.

6.

The purpose of a function is...

to ensure the program runs correctly.
produce side effects on the variables.
to structure programs, to reduce repetition, and to isolate sections of code from each other.

perform calculations on numeric data.

7.

If you were to require an unspecified number of arguments to be passed to a function you would need to use the _____________ keyword in the function.

array
var
arguments

parameters

8.

How many arguments can be passed to a function?

3
1
as many as you want.

2

Recursion is an process by which a function calls...

a function that is contained within the function declaration.
a function that returns no value.
itself.

another function.

10.

ECMAScript 2015 introduced the concept of default parameters so it is now possible to specify a default value in...

the calling code.
the function body.
the return value.
the function head or function signature.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions

Question

Name some unique risks that may arise when evaluating FDI.

Answered: 1 week ago