Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How can a JavaScript developer modify a scalar global variable from within a function? Question 16 options: 1) Refer to the global variable by its

How can a JavaScript developer modify a scalar global variable from within a function?

Question 16 options:

1) Refer to the global variable by its name,
2) Pass the global variable as an argument to the function.
3) Use the global operator to declare the variable to be global.
4) This is syntactically impossible.

Save

Question 17 (5 points)

image text in transcribed

What is the value of variable b after the following JavaScript fragment is evaluated? What is the value of a? a = 3; b = ++a * 4;

Question 17 options:

1) The variable b is 16 and a is 3.
2) The variable b is 16 and a is 4.
3) The variable b is 12 and a is 4.
4) The variable b is 12 and a is 3.

Save

Question 18 (5 points)

image text in transcribed

If two JavaScript objects are created using the same constructor, can the developer be certain they contain identical properties and methods. Why or why not?

Question 18 options:

1) Yes, because they were created using the same constructor.
2) The properties and methods will be the same, but the values may be different.
3) No because properties and methods can be added or deleted dynamically.
4) No because it depends upon how the constructor was called.

Save

Question 19 (5 points)

image text in transcribed

What is the difference between a JavaScript while statement and a do-while statement?

Question 19 options:

1) The while statement is controlled by a loop variable or expression and do-while is a counter-controlled loop.
2) The while statement defines a pretest loop and do-while defines a posttest loop.
3) The while statement defines a posttest loop and do-while defines a pretest loop.
4) The while statement is a counter-controlled loop and do-while is controlled by a loop variable or expression.

Save

Question 20 (5 points)

image text in transcribed

Given the ID of an HTML element, how can the JavaScript developer obtain a pointer to the element within the document object?

Question 20 options:

1) Use the document.getElementPointer( ) method.
2) Use the document.getElementById( ) method.
3) Use the document.getPointer( ) method.
4) Use the document.findElementById( ) method.

Save

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

Step: 3

blur-text-image

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

Power Bi And Azure Integrating Cloud Analytics For Scalable Solutions

Authors: Kiet Huynh

1st Edition

B0CMHKB85L, 979-8868959943

More Books

Students also viewed these Databases questions