300 likes | 439 Views
Review and Practice for Final exam. Final exam. Date: December 20, 3:15 – 5:15pm Format: Two parts: First part : multiple-choice questions (15 questions in 15 minutes), close book. Second part: solve two problems using computers in Hyer Hall Lab, open book.
E N D
Final exam • Date: December 20, 3:15 – 5:15pm • Format: Two parts: First part: multiple-choice questions (15 questions in 15 minutes), close book. Second part: solve two problems using computers in Hyer Hall Lab, open book.
Review for final exam – multiple choice questions What object is at the top of all browser object models? a. A window b. A document c. A form d. A button
Review for final exam – multiple choice questions What object is at the top of all browser object models? a. A window b. A document c. A form d. A button
Questions The event handler onmouseover is triggered with which of the following? a. The event handler onmouseover is triggered when the mouse moves on an element and then off. b. The event handler onmouseover is triggered when the mouse moves off an element. c. The event handler onmouseover is triggered when the mouse moves on an element. d. The event handler onmouseover is triggered when the mouse moves around the element.
Questions The event handler onmouseover is triggered with which of the following? a. The event handler onmouseover is triggered when the mouse moves on an element and then off. b. The event handler onmouseover is triggered when the mouse moves off an element. c. The event handler onmouseover is triggered when the mouse moves on an element. d. The event handler onmouseover is triggered when the mouse moves around the element.
Questions What letter values would be included for the following variable, which will be used for validation purposes: var validCharacters = /[a-z]/? a. Only A and Z would be included. b. Both uppercase and lowercase letters would be included. c. Only lowercase letters A-Z would be included. d. Only uppercase letters A-Z would be included.
Questions What letter values would be included for the following variable, which will be used for validation purposes: var validCharacters = /[a-z]/? a. Only A and Z would be included. b. Both uppercase and lowercase letters would be included. c. Only lowercase letters A-Z would be included. d. Only uppercase letters A-Z would be included.
Questions When using the RegExp object a /i indicates that the matching is case ________ a. Sensitive b. Insensitive
Questions When using the RegExp object a /i indicates that the matching is case ________ a. Sensitive b. Insensitive
Questions A user can do which of the following with cookies? a. Read b. Delete c. Update d. All of the above.
Questions A user can do which of the following with cookies? a. Read b. Delete c. Update d. All of the above.
Questions The following code: document.write(“<p>” + document.cookie + “<p>”); does what? a. Writes the current value of the cookie on the Browser. b. Writes the current value of the cookie to memory only. c. Writes the current value of the cookie to a file on the PC. d. Writes the current value of the cookie on the server.
Questions The following code: document.write(“<p>” + document.cookie + “<p>”); does what? a. Writes the current value of the cookie on the Browser. b. Writes the current value of the cookie to memory only. c. Writes the current value of the cookie to a file on the PC. d. Writes the current value of the cookie on the server.
Questions What symbol separates cookie parameters? a. A semicolon. b. A colon. c. A comma. d. A period.
Questions What symbol separates cookie parameters? a. A semicolon. b. A colon. c. A comma. d. A period.
Questions Which of the following is true concerning a function to parse the data in a cookie? a. JavaScript has a built-in function called getData(). b. JavaScript has a built-in function called getCookie(). c. JavaScript has a built-in function called getString(). d. JavaScript does not have a built-in function.
Questions Which of the following is true concerning a function to parse the data in a cookie? a. JavaScript has a built-in function called getData(). b. JavaScript has a built-in function called getCookie(). c. JavaScript has a built-in function called getString(). d. JavaScript does not have a built-in function.
Questions Which is true of JavaScript? A. JavaScript is not object oriented B. JavaScript employs class-based inheritance C. JavaScript employs prototype-based inheritance D. JavaScript supports pointers
Questions Which is true of JavaScript? A. JavaScript is not object oriented B. JavaScript employs class-based inheritance C. JavaScript employs prototype-based inheritance D. JavaScript supports pointers
Questions What is the document property for changing the background color in JavaScript? A. backgroundColor B. bgColor C. bkColor D. pageColor
Questions What is the document property for changing the background color in JavaScript? A. backgroundColor B.bgColor C.bkColor D. pageColor
Review for final exam – problem solving problems • Step 1: Create this form • Create a function to validate the expiration date. When the user presses the Validate button, this function should be called to validate the month and year. • If the value of the year entered is less than the current year, the date entered is invalid. • If the value of the year entered is equal to the current year and the value of the month entered is less than the value of the current month, the date entered is invalid. • If the month entered is less than 1 or greater than 12, the date entered is invalid.
Javascript technical interview Questions • What does isNaN function do? • What are JavaScript data types? Return true if the argument is not a number. Numeric, String, Boolean, Null, Undefined
Javascript technical interview Questions 3. How can JavaScript make a Web site easier to use? That is, are there certain JavaScript techniques that make it easier for people to use a Web site? • make the page more immediately interactive • without having to submit the script to the server
Javascript technical interview questions 4. Where are cookies actually stored ? 5. How to comment javascript code? • at client site • - Browser-dependent Use // for line comments and/* */ for block comments
Javascript interview questions 6. What is the difference between undefined value and null value? 7. How to read and write a file using javascript? Undefined value cannot be explicitly stated that is there is no keyword called undefined whereas null value has keyword called null. You can NOT read and write from/to a file directly Using client-side javascript code only But you can combine javascript + java code to do this
Javascript technical questions 8. What can javascript programs do? Generation of HTML pages on-the-fly without accessing the Web server.The user can be given control over the browser like User input validation Simple computations can be performed on the client’s machineThe user’s browser, OS, screen size, etc. can be detectedDate and Time Handling
Javascript technical interview questions How to embed javascript in a web page? How to create a function in Javascript? javascript code can be embedded in a web page between <script langugage="javascript"></script> tags function <function_name> (parameters) { }
Practice for final exam You are a set of 10 favorite songs of three different genres (country, pop, and rock). You are asked to create a form that display the list of songs based from genre.