Which of the following statements is an advantage of using JavaScript on the server-side?
A. Server-side validation conserves more bandwidth than client-side validation
B. Server-side JavaScript runs the script on the server, thus eliminating compatibility problems with client-side browsers
C. Server-side JavaScript requires lass processing power on the served level than client- side JavaScript
D. Server-side JavaScript results in a higher level of end-user satisfaction
Which of the following will correctly declare the courseNumber variable as a siring data type?
A. var courseNumber = ''JS101'';
B. var courseNumber = ''JS101'';
C. var_courseNumber = JS101'';
D. var courseNumber = JS101;
Scarlet has the following code in her script:
Var namesArr =[`'Joseph',' Charlotte'', `'Nicole''];
She wants to add the name Hank to the end of the array so that its length is 4. What code should she use?
A. namesArr [4] ''Hank'';
B. namesArr push (''Hank'');
C. namesArr unshift (''Hank'');
D. namesArr .shift (''Hank'');
Zamar wants to add buttons to his Web page to allow users to navigate forward and backward through his Web site similar to the Forward and Back buttons in the Web browser window. Which JavaScript object will he use?
A. window
B. screen
C. history
D. navigator
Consider the following code:
What code would you use to determine if the check box has been checked or not?
A. Document.form[0].termsService.selected
B. Document.form[0].termsService.validityState
C. Document.form[0].termsService.checked
D. Document .form[0].termsService.value
Juan is testing his JavaScript application, which includes the following code:
Assuming Juan enters August for his birth month and his name for first name, what is the value of birthMonth after executing this code?
A. August
B. Juan was born in August
C. Juan was born in August
D. What month were you born? What is your first name?
What is the expected result when executing the following scripts in a web browser?
A. A pop-up alert box will display Fair followed by a pop-up alert box displaying Bad
B. A pop-up alert box will display Poor
C. There is an error in the code, no pop-up alert box will appear
D. Two pop-up alert boxes will appear one will display Fair and one will display Poor
Consider the following code.
Which of the following will occur if the user's response is 25?
A. The response will not be tested due to an error in the line containing the conditional operator.
B. The statement "You are not old enough to rent a car from our car rental agency " will be displayed.
C. The statement "You are old enough to rent a car from our car rental agency " win be displayed.
D. The statement You are not old enough" will be displayed in an alert box.
Marshall's computer previously contracted malware because he unknowingly clicked on an infected link in a pop-up window. What can he do to secure the Web browser so that he is protected in the future?
A. Install the latest beta update for the Web browser
B. Disable cookies in the Web browser
C. Enable the pop-up blocker
D. Install anti-virus software
Consider the following code:
What change should be made to ensure that it correctly displays the value of name in all uppercase letters?
A. Line 2 should be changed to name = name . toUpperCase () ;
B. Line 2 should be changed to name .prototype . toUpperCase () ;
C. Line 3 should be changed to document. write (NAME) :
D. Line 1 should be changed to var name = new sting("Jaccb");