Exam 19: Programming Functions

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

When calling a function, it does not matter which order you list the arguments .

Free
(True/False)
4.8/5
(79)
Correct Answer:
Verified

False

Given the following JavaScript function, which of the following is NOT a possible result? Function tossIt() { Return Math . random(); }

Free
(Multiple Choice)
4.9/5
(77)
Correct Answer:
Verified

D

When you write code to ask the computer to run or execute the statements in a function, this is referred to as ________ the function .

Free
(Short Answer)
4.8/5
(78)
Correct Answer:
Verified

calling

If a function definition contains two parameters, two arguments must be included in the function call .

(True/False)
4.7/5
(75)

The HTML ________ tag provides an area where JavaScript can draw lines and figures .

(Short Answer)
4.8/5
(94)

When two variables have the same name, but one is global and one is local, the JavaScript program will not run .

(True/False)
4.8/5
(65)

A variable cannot be used as part of a calculation to assign a value to itself . For example, this JavaScript statement would cause an error, assuming myNum is a numeric variable that has been previously declared and initialized:myNum = myNum*3 + 75/myNum;

(True/False)
4.7/5
(74)

If you wanted the following function to return only the two values of 0 and 1, how would you re-write line 2? 1 ) function tossIt() { 2 ) return Math . random(); 3 ) }

(Multiple Choice)
4.9/5
(60)

A(n) ________ is a programming structure with a name, an optional parameter list, and a definition that encapsulates an algorithm .

(Short Answer)
4.8/5
(68)

Output directly onto a web page from JavaScript is done using the ________ built-in function .

(Multiple Choice)
4.8/5
(76)

What, if anything, is wrong with the following JavaScript code? <script>document . write("<img src = 'puppy . JPG'/>");</script>

(Multiple Choice)
4.8/5
(72)

When a function is called, you write the function's name and include any necessary arguments (that is, input values) inside ________ .

(Short Answer)
4.9/5
(92)

Functions that are written so they can be reused in other programs are considered ________ .

(Short Answer)
4.8/5
(69)

Variables in the parameter list of a JavaScript function are declared automatically .

(True/False)
4.8/5
(82)

The numbers generated by the Math . random()function

(Multiple Choice)
4.7/5
(85)

Select all that apply . Which of the following are required parts of a function?

(Multiple Choice)
4.9/5
(76)

Select all that apply . What does the following command do? Ctx . quadraticCurveTo(20,20,20,50);

(Multiple Choice)
4.8/5
(90)

Programmers rarely use code written by others .

(True/False)
4.8/5
(75)

The arguments in a function call pass values to the parameters, matched in order from left to right .

(True/False)
4.8/5
(77)

The inputs to a function are called

(Multiple Choice)
4.8/5
(92)
Showing 1 - 20 of 42
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)