Which statement will correctly call a JavaScript function without error?
A. var myFunction()
B. initiate myFunction()
C. call myFunction()
D. myFunction()
Consider only the following code:
Which of the following would properly supply the sum of the two numbers?
A. return sum;
B. mySum (num1+num2);
C. return num1+num2;
D. return sum(num1+num2);
Consider the following code:
Which statement could be used to determine the value of the first radio button?
A. document.rdoGroup1.value
B. document.myForm.rdoGroup1[0].value
C. document.getElementById(rdoGroup1).value
D. document.getElementById("rdoGroup1").value
Which statement about the JavaScript form object is true?
A. The JavaScript form object has no relationship to the X/HTML
tags are present in the X/ HTML document.Which script block will display Hello World in the browser when the script is run?
A.
B.
C.
D.
You want to display a series of elements. Which choice demonstrates the correct syntax for an array in JavaScript?
A. var myArray = Array(1,2,3,4,5)for (var i = 0; i < myArray.[i]; i++ ){document.write( myArray[i] + "
" );
B. var myArray = new Array(1,2,3,4,5)for (var i = 0; i < myArray.length ; i++ ) {document.write( myArray[i] + "
" );
C. var myArray = new Array(1,2,3,4,5)for (var i = 1; i < myArray.length; i-- ) {document.write ( myArray.length + "
" );
D. var myArray = Array(1,2,3,4,5)for (var i = 1; i < myArray.[i] ; i-- ){document.write( myArray[i] + "
" );
In an X/HTML form, which script block will retrieve an input value and display it back without errors or warnings?
A.
You entered:
C.
You entered:
E.
You entered:
F.
You entered:
Which statement will return the name of the browser being used to view the script?
A. navigator.appName
B. navigator.platform
C. navigator.userAgent
D. navigator.appVersion
Consider the following code:
What will this alert display?
A. It is currently dark in the room
B. It is currently bright in the room
C. It is currently in the room
D. It is currently bright : dark in the room
How is the alert() method different from prompt() and confirm()?
A. The alert() method generates a modal dialog box, which requires user action before the next JavaScript instruction can be executed,whereas prompt() and confirm() do not.
B. The alert() method requires only one parameter, whereas prompt() and confirm() require two parameters.
C. The alert() method requires two parameters, whereas prompt() and confirm() require only one parameter.
D. The prompt() and confirm() methods return a value, whereas alert() does not.