Thursday, January 2, 2014

Tutorial 10 Questions 1 through 50



  1. _____ are useful because they can store information created in one part of your program and use that information in another.
    1. Conditional operators
    2. Logical operators
    3. Assignment operators
    4. Variables - correct answer
  2. _____ can be used to look for e-mail addresses by scanning Web pages.
    1. Span
    2. Server-side
    3. An E-mail harvester - correct answer
    4. Client-side
  3. _____ is an interpreted language, meaning that the program code is executed directly without compiling.
    1. JavaScript - correct answer
    2. Java
    3. C++
    4. All of the above
  4. _____ is essentially junk email
    1. spam - correct answer
    2. client-side
    3. server-side
    4. an e-mail harvester
  5. _____-side programs do not require users to wait for data to be sent over the Internet to a Web server.
    1. Server
    2. File
    3. Client - correct answer
    4. Database
  6. A function can not be designed to return a value.
    1. true
    2. false - correct answer
  7. A function may require _____ which are values used by the function.
    1. terms
    2. parameters - correct answer
    3. ids
    4. names
  8. A global variable has local scope only.
    1. true
    2. false - correct answer
  9. A multiline comment begins with a /* and ends with a */.
    1. true - correct answer
    2. false
  10. A numeric value is any group of characters such as "Hello".
    1. True
    2. False - correct answer

  11. A reference to an external Javascript file is normally placed int he _____ section of an HTML document, according to good design principles.
    1. body
    2. head - correct answer
    3. title
    4. paragraph
  12. A text string indicates that no value has yet been assigned to the variable.
    1. true
    2. false - correct answer
  13. A variable declared in a function is also called a(n) _____ variable.
    1. global
    2. scope
    3. local scope - correct answer
    4. none of the above
  14. A variable declared in a function is said to have _____.
    1. global scope 
    2. no scope
    3. local scope - correct answer
    4. none of the above
  15. A variable not declared in a function is also called a(n) _____ variable.
    1. global - correct answer
    2. scope
    3. illegal
    4. local
  16. A(n) _____ is a person who sends out unsolicited emails.
    1. analyst
    2. spammer - correct answer
    3. harvester
    4. staffer
  17. A(n) _____ retrieves a Web page from the server.
    1. programmer
    2. server-side program
    3. user - correct answer
    4. information set
  18. A(n) _____ variable has no value at all.
    1. null - correct answer
    2. empty
    3. cipher
    4. negative
  19. Although not a requirement, one programming convention is to place all of the function definitions used in the Web page within the head section.
    1. true - correct answer
    2. false
  20. Although the standard developed by the ECMA is called ECMAScript, browsers still generally refer to it as VBScript.
    1. true
    2. false - correct answer

  21. Any variables not declared within functions have local scope.
    1. true
    2. false - correct answer
  22. Before you use a variable in a Javascript program, you should _____ it.
    1. compile
    2. concatenate
    3. declare - correct answer
    4. nullify
  23. Case 10-1:  Legend Films is planning to create a page that will allow users to email their video requests for the studio to add to their online video offerings.  To prevent the film orderer from receiving spam, the Web designers should _____ e-mail addresses.
    1. encrypt
    2. reverse
    3. scramble - correct answer
    4. none of the above
  24. Case 10-2:  Bobby had added a form to his blog to allow people to e-mail him feedback.  He is having trouble getting his pages to validate and his JavaScript to work.  Bobby's JavaScript shows in his pages when displayed in older browsers.  To hid his JavaScript, he can use _____.
    1. headers
    2. footers
    3. hidden boxes
    4. comments - correct answer
  25. Case 10-2:  Bobby had added a form to his blog to allow people to e-mail him feedback.  He is having trouble getting his pages to validate and his JavaScript to work.  The errors Bobby only finds when his JavaScript executes are called _____ errors.
    1. logical
    2. ending
    3. run-time - correct answer
    4. load-time
  26. Case 10-2:  Bobby had added a form to his blog to allow people to e-mail him feedback.  He is having trouble getting his pages to validate and his JavaScript to work.  To help debug his code, Bobby could monitor the changing values of variables using a(n) _____.
    1. alert dialog box - correct answer
    2. return statement
    3. modular code
    4. logical error
  27. Case 10-3:  Arlene's Authentic Indian Wear sells handmade Cheyenne Indian clothing online.  She has added some JavaScript functions to calculate how much a person has to pay before they submit the order page, but is having some trouble.  In Firefox, the error console woudl allow her to _____ JavaScript commands.
    1. locate
    2. add
    3. delete
    4. evaluate - correct answer
  28. Comments can be used to _____.
    1. document the code
    2. hide code from older browsers
    3. both a and b - correct answer
    4. none of the above
  29. Each JavaScript command line ends with a(n) _____ to separate it from the next command line in the program.
    1. comma
    2. ampersand
    3. semicolon - correct answer
    4. period
  30. Early on a problem with Java was that nonprogrammers found it difficult to learn and use to write their own Java applets.
    1. true - correct answer
    2. false
  31. Essentially, Java and JavaScript are the same.
    1. true
    2. false - correct answer
  32. For JavaScript external files, the MIME type is _____.
    1. file/javascript
    2. text/javascript - correct answer
    3. mime/javascript
    4. src/javascript
  33. Function names, unlike variable names, are case-sensitive.
    1. true
    2. false - correct answer
  34. Function parameters must be placed within parentheses, following the function name, and the parameters must be separated by periods.
    1. true
    2. false - correct answer
  35. If a function returns a value, it can be stored in a variable.
    1. true - correct answer
    2. false
  36. If x has the value 5 and the variable y has the value "combo", the y + "no" + x results in what value?
    1. an error
    2. null
    3. true
    4. combo no 5 - correct answer
  37. If you place JavaScript code in a separate file, the different pages in your Web site can use the programs you write in the same way that an entire site can use an external style sheet.
    1. true - correct answer
    2. false
  38. In client-side programming, programs run on the client side directly change the server data.
    1. true
    2. false - correct answer
  39. In earlier versions of HTML, the _____ attribute was used to indicate the scripting language.
    1. type
    2. language - correct answer
    3. mime/javascript
    4. src
  40. In Java, programs cannot write content to the hard disk.
    1. true - correct answer
    2. false
  41. In naming a variable, the first character must be either a letter or a(n) _____.
    1. underscore - correct answer
    2. pound sign
    3. number sign
    4. ampersand
  42. In the figure above, what are the variables?
    1. userName
    2. emServer
    3. emLink
    4. all of the above - correct answer
  43. In XHTML, the language attribute is used to indicate the script language in the <script> tag.
    1. true
    2. false - correct answer
  44. Internet Explorer actually supports a slightly different version of JavaScript called Jscript.
    1. true - correct answer
    2. false 
  45. It is common practice for JavaScript programmers to create libraries of functions located in external files to be easily accessible to many Web pages.
    1. true - correct answer
    2. false
  46. Java requires that users have access to the _____ in order to create an executable Java applet.
    1. DTD
    2. JDK - correct answer
    3. ECMAScript
    4. DDL
  47. JavaScript _____ most occurrences of white space.
    1. repeats
    2. ignores - correct answer
    3. comments
    4. executes
  48. JavaScript code can be inserted directly into an HTML or XHTML file, or placed in a separate text file that is linked to the Web page.
    1. true - correct answer
    2. false
  49. JavaScript commands can be inserted directly into an HTML file rather than being placed in a separate program file.
    1. true - correct answer
    2. false
  50. JavaScript is _____ so you must pay attention to whether or not letters are capitalized.
    1. case insensitive
    2. case sensitive - correct answer
    3. case indifferent
    4. none of the above

No comments:

Post a Comment