Javascript Fundamentals Ch.8
Which of the following is true regarding JavaScript? Question options: a. JavaScript is a full-fledged compiled, object-oriented language. b. JavaScript runs directly inside the browser without the need for the JVM. c. JavaScript is popular for its ability to run on any platform with a JVM installed. d. JavaScript is object oriented in that the objects in JavaScript are class-based.
Javascript runs directly inside the browser without the need for the JVM
JavaScript was first introduced by __________. Question options: a. Microsoft b. Netscape c. Oracle d. Adobe
Netscape
When we say that JavaScript variables are a dynamically typed we mean that Question options: a. JavaScript functions run sequentially in the order that the script was typed. b. it doesn't matter where the JavaScript code is typed on the page. c. a variable type can be an integer, and then later a string, then later an object. d. a variable type cannot be changed after the variable has been initialized.
a variable type can be an integer, and then later a string, then later an object.
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) _____. Question options: a. if...then statement b. case statement c. if...else statement d. if statement
if...else statement
Which of the following is the correct comparison operator for equals? Question options: a. = b. == c. != d. !==
==
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? Question options: a. A && B is true b. A || B is true c. A || B is false d. A ! B is false
A || B is true
Which of the following is true about the alert() function Question options: a. The alert() function makes the browser show a pop-up to the user. b. The alert() function obscures the underlying webpage. c. The user has to click OK before any other actions can be taken. d. All of these are true.
All of these are true.
The JavaScript function to place the date on a page is: Question options: a. Now() b. Math.Date() c. Math.Today() d. Date()
Date()
JavaScript is the client-side implementation of the Java programming language, both developed by Sun Java in collaboration with Oracle. Question options: a. True b. False
False
JavaScript relies on server-side processing to execute the code. Question options: a. True b. False
False
Like many programming languages, JavaScript variable declarations require a data type such as int"," char or string. Question options: a. True b. False
False
There are objects that are included in the JavaScript language; but you cannot define your own kind of objects. Question options: a. True b. False
False
Which of the following is NOT an advantage of client-side scripting? Question options: a. Processing can be offloaded from the server to client machines. b. The browser can respond more rapidly to user events than a request to a remote server could. c. Client-side scripting reduces the load on the server. d. Idiosyncrasies between various browsers and operating systems make it easy to test for all potential client configurations.
Idiosyncrasies between various browsers and operating systems make it easy to test for all potential client configurations.
The JavaScript method .toString(): Question options: a. puts a number in displayable form b. returns the length of a string of characters c. displays the JavaScript on a webpage d. saves the answer to a file
puts a number in displayable form
Which is true about the JavaScript statement var x = 3? Question options: a. The variable x has been declared but not initialized. b. The variable x has been declared and initialized. c. The variable x has been initialized but not declared. d. The variable x has not been declared nor initialized.
The variable x has been declared and initialized
Any text within the opening and closing <noscript> ... </noscript> tags will be displayed only to users without the ability to load JavaScript. Question options: a. True b. False
True
Concatenation can be written in either of the following ways: var str = greet.concat("Morning"); var str = greet + "Morning"; Question options: a. True b. False
True
JavaScript is an implementation of a standardized scripting language called ECMAScript. Question options: a. True b. False
True
The principles of Graceful Degradation and Progressive Enhancement are implemented differently, but either strategy can successfully be used to accommodate users with older browsers. Question options: a. True b. False
True
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. Question options: a. True b. False
True