QuestionQuestion

Question 1
What is the result of writing the keyword var in a function parameter list?
a. The result would be a JavaScript runtime error.
b. The parameter following the keyword would have global scope.
c. The parameter following the keyword would have local scope.
d. The parameter following the keyword would become a static variable.

Question 2
All variables declared in function definitions are ________.
a. global variables
b. local variables
c. static variables
d. constant variables

Question 3
Functions that are not provided as part of the JavaScript language are called ________ functions.
a. add-on
b. programmer-defined
c. man-made
d. extra

Question 4
Which of the following is a legal function call for the function definition provided below?
function square( y )
{
return y * y;
}
a. square(7+2);
b. (7).square;
c. square(7,2);
d. square 7;

Question 5
What does the following statement do?
Math.floor( Math.random() * 12 );
a. This creates a random number from 0 up to and including 12.
b. This creates a random number from 0 up to but not including 12.
c. This creates a random number from 1 up to and including 12.
d. This creates a random number from 1 up to but not including 12.

Question 6
The "prepackaged" functions that belong to JavaScript objects such as Math.pow and Math.round are often called ________.
a. subroutines
b. methods

Question 7
The technique of developing and maintaining a large program by constructing it from small, simple pieces is called ________.
a. divide and conquer
b. modular programming
c. multitasking
d. multiprogramming

Question 8
Functions are invoked by writing the name of the function, followed by the function's ________ enclosed in parentheses.
a. name
b. static variables
c. arguments
d. constant variables

Question 9
The value a in the following statement is called the ________ and the value b is called the ________.
face = Math.floor( a + Math.random() * b );
a. scaling factor, shifting value
b. shifting value, scaling factor
c. scaling value, shifting factor
d. shifting factor, scaling value

Question 10
What would the function cube return, assuming it is called with the statement cube( 3 )?
function cube( y );
{
return y * y * y;
}
a. JavaScript runtime error
b.3
c. 9
d. 27

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

Question 1: The answer is option A
Question 2: The answer is option B...
$18.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Web Development (HTML, XML, PHP, JavaScript, Adobe, Flash, etc.) Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats