web fundamentals 7

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

12. The JavaScript method .toString(): 1) puts a number is displayable form 2) returns the length of a string of characters 3) displays the JavaScript on a webpage 4) saves the answer to a file

1

26. In JavaScript a variable can be an integer then later can be a string if so desired. 1) True 2) False

1

14. Which is true about the JavaScript statement var x = 3? 1) The variable x has been declared but not initialized. 2) The variable x has been declared and initialized. 3) The variable x has been initialized but not declared. 4) The variable x has not been declared nor initialized.

2

18. JavaScript relies on server-side processing to execute the code. 1) True 2) False

2

19. Flash applets require the Java Plug-in to run on the client machine. 1) True 2) False

2

22. JavaScript is the client-side implementation of the Java programming language, both developed by Sun Java in collaboration with Oracle. 1) True 2) False

2

9. Which of the following is the correct comparison operator for equals? 1) = 2) == 3) != 4) !==

2

20. Java applets require the Java Runtime Environment to run on the client machine. 1) True 2) False

1

21. JavaScript is an implementation of a standardized scripting language called ECMAScript. 1) True 2) False

1

24. Any text within the opening and closing <noscript> ... </noscript> tags will be displayed only to users without the ability to load JavaScript. 1) True 2) False

1

25. The principles of Graceful Degradation and Progressive Enhancement are implemented differently, but either strategy can successfully be used to accommodate users with older browsers. 1) True 2) False

1

28. Variable assignment can happen at declaration-time by appending the value to the declaration, or at run time with a simple right-to-left assignment. 1) True 2) False

1

30. Concatenation can be written in either of the following ways: var str = greet.concat("Morning"); var str = greet + "Morning"; 1) True 2) False

1

31. To interact with the HTML document in which it is contained, JavaScript uses the Document Object Model also referred to as the DOM Tree. 1) True 2) False

1

1. Which of the following is true regarding JavaScript? 1) JavaScript is a full-fledged compiled, object-oriented language. 2) JavaScript runs directly inside the browser without the need for the JVM. 3) JavaScript is popular for its ability to run on any platform with a JVM installed. 4) JavaScript is object oriented in that the objects in JavaScript are class-based.

2

10. If A is true and B is false, which of the following results is returned for these the Boolean operators based on the truth tables? 1) A && B is true 2) A || B is true 3) A || B is false 4) A ! B is false

2

23. A key feature in AJAX programming is that the asynchronous data requests require a response from the server before the next lines of code can be executed. 1) True 2) False

2

27. Like many programming languages, JavaScript variable declarations require a data type such as int, char or string. 1) True 2) False

2

29. There are objects that are included in the JavaScript language; but you cannot define your own kind of objects. 1) True 2) False

2

32. A JavaScript event is an action that can be detected by JavaScript, which can only be triggered by user interaction. 1) True 2) False

2

4. JavaScript was first introduced by __________. 1) Microsoft 2) Netscape 3) Oracle 4) Adobe

2

5. Of the following web clients, which will run JavaScript by default? 1) a screen reader used for Accessibility purposes for the visually impaired. 2) a text-based browser like Lynx 3) an automated software agent like a web crawler client 4) the default browser on an iPhone

2

7. Which of the following is true? 1) When using the reserved keyword function and a function name, you are defining what the function does. 2) Both the reserved keyword function and its name are required when you are calling the function. 3) You can only call a function if you have previously defined all of its parameters using the reserved keyword function. 4) all of these are true.

2

13. If you want to execute one set of statements when a condition evaluates to false and another set of statements when the condition evaluates to true, the best statement to use is a(n) _____. 1) if...then statement 2) case statement 3) if...else statement 4) if statement

3

16. What is the value of jobs[2] in the following section of code? var jobs= new Array("Programming", "Database management", "Web Design"); 1) Programming 2) Database management 3) Web Design 4) The array has been declared but no values have been assigned.

3

17. What does the following JavaScript code do (assume it is in a script element)? function myFcn( a, b, c ){ var q = b; q = c; return q; } var x = myFcn( 1, "stuff", "whatever" ); document.write( "<p>" + x + "</p>" ); 1) Writes the number 1 to the web page. 2) Writes the string stuff to the web page. 3) Writes the string whatever to the web page. 4) Nothing as there is an error in the code.

3

6. When we say that JavaScript variables are a dynamically typed we mean that 1) JavaScript functions run sequentially in the order that the script was typed. 2) it doesn't matter where the JavaScript code is typed on the page. 3) a variable type can be an integer, and then later a string, then later an object. 4) a variable type cannot be changed after the variable has been initialized.

3

11. The JavaScript function to place the date on a page is: 1) Now() 2) Math.Date() 3) Math.Today() 4) Date()

4

15. Which of the following are correct syntax for JavaScript comments? 1) // My comments 2) /* My comments and some more comments */ 3) /* More comments */ 4) All of these are correct

4

2. Which of the following is NOT an advantage of client-side scripting? 1) Processing can be offloaded from the server to client machines. 2) The browser can respond more rapidly to user events than a request to a remote server could. 3) Client-side scripting reduces the load on the server. 4) Idiosyncrasies between various browsers and operating systems make it easy to test for all potential client configurations.

4

3. Which of the following is considered server-side scripting? 1) Flash objects 2) Java applets 3) JavaScript 4) PHP

4

8. Which of the following is true about the alert() function 1) The alert() function makes the browser show a pop-up to the user. 2) The alert() function obscures the underlying webpage. 3) The user has to click OK before any other actions can be taken. 4) All of these are true.

4


Kaugnay na mga set ng pag-aaral

TRY 2_CFA Institute_Fixed Income

View Set

Chapter 22: Care of Patients with Cancer

View Set

Soc 1 Chapter 8 Race and Ethnicity

View Set

NSG 170 Unit 5 - Cellular Regulation

View Set

Physics Final Exam Chapter 5-6 quizzes

View Set