JavaScript Fundamentals Quiz

Test your knowledge of JavaScript programming concepts including operators, objects, functions, and event handling

10 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which is not a built-in function?

  1. parseInt()
  2. exec()
  3. eval()
  4. parseFloat()
Question 2 Multiple Choice (Single Answer)

Choose the built-in object:

  1. Password
  2. Math
  3. Link
  4. Hidden
Question 3 Multiple Choice (Single Answer)

Choose the external object:

  1. Date
  2. Option
  3. Checkbox
  4. Layer
Question 4 Multiple Choice (Single Answer)

Which is not considered a JavaScript operator?

  1. new
  2. this
  3. delete
  4. typeof
Question 5 Multiple Choice (Single Answer)

What allows JavaScript to access methods and properties of a Java applet?

  1. The Java console
  2. LiveConnect
  3. LiveWire
  4. LiveWire Pro
Question 6 Multiple Choice (Single Answer)

With the advent of JavaScript1.2, the String.replace() method facilitates character replacement in strings. How would you remove every 'x' from the variable myString without the new features of 1.2?

  1. for(var i = 0; i < myString.length; i++) {
  2. var myArray = myString.split('x'); myString = myArray.join('');
  3. It wasn't possible until now. Thanks JavaScript1.2!
  4. The first two both work fine
Question 7 Multiple Choice (Single Answer)

What HTML attribute allows a Java applet explicit permission to access JavaScript objects and functions?

  1. MAYSCRIPT
  2. CODE
  3. PARAM
  4. CODEBASE
Question 8 Multiple Choice (Single Answer)

Once agin, consider the same three variables: someText = 'JavaScript1.2'; pattern = /(\w+)(\d).(\d)/i; outCome = pattern.exec(someText); What does outCome[0] contain?

  1. true
  2. false
  3. null
  4. JavaScript1.2
Question 9 True/False

External scripts need to be enclosed in comments so that browsers that do not understand Javascript will not display the code on the page

  1. True
  2. False
Question 10 Multiple Choice (Single Answer)

When can you not trigger Javascript from an event handler?

  1. when another event is still being processed
  2. when Javascript is disabled
  3. when the page uses stylesheets
  4. when it is running locally instead of on the web