1. Which of the following is NOT done with JavaScript ?

  • Form Validation
  • RGB Colors
  • Browser Detection
  • RGB Value

2. It is usually advisable to keep as much JavaScript as possible in which section ?

  • Head
  • Layer
  • Body
  • Title

3. JavaScript lines end with what ?

  • comma
  • semicolon
  • colon
  • Bracket

4. Which of the following is NOT a type of popup box ?

  • Alert
  • Confirm
  • Radio
  • Text

5. The most common way to assign a value to a variable is by using what ?

  • Equals sign
  • Name It
  • CSS
  • HTML

6. a++; is the same as which of the following ?

  • a=a+2;
  • a=a+3;
  • a=a+1;
  • a=a+4;

7. To keep the browser from performing a script as soon as it is loaded you need to write the script as a what ?

  • function
  • delay
  • performance
  • Flexibility

8. Actions that can be detected by javascript are called ?

  • HTML
  • Events
  • Array
  • ArrayList

9. A variable that your webpage can store on or retrieve from the users computer is known as ?

  • Applet
  • Java
  • Cookie
  • Session

10. In JavaScript, capital letters are different from lowercase letters ?

  • Not on windows platforms
  • Yes
  • No
  • Not on Linux Platform

11. Which is detected when the mouse moves over a link ?

  • overMouse event
  • onMouseOver event
  • onRollOver event
  • OnMouseOut event

12. How do you read the first character in a string ?

  • stringName.charAt(0);
  • stringName.substring(1);
  • stringName.charAt(1);
  • stringName.charAt(2);

13. Which has no syntax error ?

  • alert(“hello “+3+” times);
  • alert(“hello “+3 times);
  • alert(“hello +3+ times”);
  • alert(“hello “+3 +” times);

14. Which method will open a new window ?

  • popUp(PageURL,WindowName,settings);
  • window.launch(PageURL,WindowName,settings);
  • window.close(PageURL,WindowName,settings);
  • window.open(PageURL,WindowName,settings);

15. Which method is used to search for a substring ?

  • stringVariable.substring(subString)
  • stringVariable.find(subString)
  • stringVariable.indexOf(subString)
  • stringVariable.indexOf(charAt(0))

16. Inside which HTML element do we put the JavaScript?

  • <scripting>
  • <javascript>
  • <js>
  • <script>

17. What is the correct JavaScript syntax to write “Hello World”?

  • Hello World”
  • document.write(“Hello World”)
  • response.write(“Hello World”)
  • (“Hello World”)

18. Where is the correct place to insert a JavaScript?

  • The <head> section
  • Both the <head> section and the section are correct
  • The <body> section
  • The <Title> Section

19. What is the correct syntax for referring to an external script called “xxx.js”?

  • <script name=”xxx.js”>
  • <script href=”xxx.js”>
  • <script src=”xxx.js”>
  • <link src=”xxx.js”>

20. which best describe void?

  • method
  • function
  • statement
  • operator

Tags: , ,

Share |

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>