JavaScript Fundamentals

Test your knowledge of basic JavaScript concepts including window manipulation, browser detection, arrays, events, operators, page redirection, timing functions, and form validation.

10 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What is the correct JavaScript syntax for opening a new window called "window5" ?

  1. new("http://www.ex-designz.net","window5")
  2. window.open("http://www.ex-designz.net","window5")
  3. open.newwindow("http://www.ex-designz.net","window5")
  4. new.window("http://www.ex-designz.net","window5")
Question 2 Multiple Choice (Single Answer)

How do you put a message in the browser's status bar?

  1. window.status = "put your message here"
  2. statusbar = "put your message here"
  3. status("put your message here")
  4. window.status("put your message here")
Question 3 Multiple Choice (Single Answer)

How do you find the client's browser name?

  1. browser.name
  2. navigator.appName
  3. client.navName
Question 4 Multiple Choice (Single Answer)

You define an array using

  1. var myarray = new Array();
  2. var myarray = array new;
  3. var new Array() = myarray;
  4. var new array = myarray;
Question 5 Multiple Choice (Single Answer)

Onclick is equivalent to which two events in sequence

  1. onmouseover and onmousedown
  2. onmousedown and onmouseout
  3. onmousedown and onmouseup
  4. onmouseup and onmouseout
Question 6 Multiple Choice (Single Answer)

Whicj best describe void?

  1. A method
  2. A function
  3. An operator
  4. A statement
Question 7 Multiple Choice (Single Answer)

Which property would you use to redirect visitor to another page?

  1. window.location.href
  2. document.href
  3. java.redirect.url
  4. link.redirect.href
Question 8 Multiple Choice (Single Answer)

Which of the following JavaScript statements use arrays?

  1. setTimeout("a["+i+"]",1000)
  2. k = a & i
  3. k = a(i)
Question 9 Multiple Choice (Single Answer)

You are a junior web designer. Your company assigns you to work on a JavaScript project. Which of the following are the advantages of using JavaScript for form validation?

  1. Conservation of client CPU resources
  2. Increased validity of form submission
  3. Conservation of bandwidth
  4. Increase end-user satisfaction
  5. Either BCD
Question 10 Multiple Choice (Single Answer)

Your company assigns you to work on a JavaScript project. With the DATE object, which of the following allows you to call a function based on an elapsed time?

  1. setElapsedTime()
  2. Timeout()
  3. setTimeout()
  4. setTime()