Review and Practice for Final exam. Final exam Date: December 20, 3:15 – 5:15pm Format: Two parts:...

30
Review and Practice for Final exam

Transcript of Review and Practice for Final exam. Final exam Date: December 20, 3:15 – 5:15pm Format: Two parts:...

Page 1: 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.

Review and Practice for Final exam

Page 2: 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.

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.

Page 3: 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.

Review for final exam – multiple choice questions

What object is at the top of all browser object models?a. A window b. A documentc. A formd. A button

Page 4: 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.

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

Page 5: 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.

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.

Page 6: 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.

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.

Page 7: 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.

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.

Page 8: 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.

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.

Page 9: 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.

Questions

When using the RegExp object a /i indicates that the matching is case ________

a. Sensitive

b. Insensitive

Page 10: 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.

Questions

When using the RegExp object a /i indicates that the matching is case ________

a. Sensitive

b. Insensitive

Page 11: 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.

Questions

A user can do which of the following with cookies?

a. Read

b. Delete

c. Update

d. All of the above.

Page 12: 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.

Questions

A user can do which of the following with cookies?

a. Read

b. Delete

c. Update

d. All of the above.

Page 13: 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.

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.

Page 14: 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.

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.

Page 15: 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.

Questions

What symbol separates cookie parameters?

a. A semicolon.

b. A colon.

c. A comma.

d. A period.

Page 16: 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.

Questions

What symbol separates cookie parameters?

a. A semicolon.

b. A colon.

c. A comma.

d. A period.

Page 17: 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.

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.

Page 18: 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.

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.

Page 19: 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.

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

Page 20: 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.

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

Page 21: 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.

Questions

What is the document property for changing the

background color in JavaScript?

A. backgroundColor

B. bgColor

C. bkColor

D. pageColor

Page 22: 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.

Questions

What is the document property for changing the

background color in JavaScript?

A. backgroundColor

B. bgColor

C. bkColor

D. pageColor

Page 23: 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.

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.

Page 24: 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.

Javascript technical interview Questions1. What does isNaN function do?

2. What are JavaScript data types?

Return true if the argument is not a number.

Numeric, String, Boolean, Null, Undefined

Page 25: 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.

Javascript technical interview Questions3. 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

Page 26: 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.

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

Page 27: 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.

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 directlyUsing client-side javascript code only

But you can combine javascript + java code to do this

Page 28: 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.

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 validationSimple computations can be performed on the client’s machineThe user’s browser, OS, screen size, etc. can be detectedDate and Time Handling

Page 29: 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.

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) {

}

Page 30: 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.

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.