Web Development Interview Questions
JavaScript and Ajax Interview Questions
1. Why so JavaScript and Java have similar name?
A. JavaScript is a stripped-down version of Java
B. JavaScript’s syntax is loosely based on Java’s
C. They both originated on the island of Java
D. None of the above
2. When a user views a page containing a JavaScript program, which machine actually executes the script?
A. The User’s machine running a Web browser
B.  The Web server
C. A central machine deep within Netscape’s corporate offices
D. None of the above
JavaScript and Ajax Interview Questions 2
11. ______ tag is an extension to HTML that can enclose any number of JavaScript statements.
A. <SCRIPT>
B.  <BODY>
C. <HEAD>
D. <TITLE>
12. How does JavaScript store dates in a date object?
A. The number of milliseconds since January 1st, 1970
B.  The number of days since January 1st, 1900
C. The number of seconds since Netscape’s public stock offering.
D. None of the above
13. Which of the following attribute can hold the JavaScript version?
A. LANGUAGE
B.  SCRIPT
JavaScript and Ajax Interview Questions 3
21. What does the <noscript> tag do?
A. Enclose text to be displayed by non-JavaScript browsers.
B.  Prevents scripts on the page from executing.
C. Describes certain low-budget movies.
D. None of the above
22. If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?
A. “New Text”?
B. para1.value=”New Text”;
C. para1.firstChild.nodeValue= “New Text”;
D. para1.nodeValue=”New Text”;
23. JavaScript entities start with _______ and end with _________.
A. Semicolon, colon
B.  Semicolon, Ampersand
JavaScript and Ajax Interview Questions 4
31. JavaScript is interpreted by _________
A. Client
B.  Server
C. Object
D. None of the above
32. Using _______ statement is how you test for a specific condition.
A. Select
B. If
C. Switch
D. For
33. Which of the following is the structure of an if statement?
A. if (conditional expression is true) thenexecute this codeend if
B.  if (conditional expression is true)execute this codeend if
C. if (conditional expression is true)  {then execute this code>->}
JavaScript and Ajax Interview Questions 5
41. When a JavaScript object is sent to Java, the runtime engine creates a Java wrapper of type ___________
A. ScriptObject
B. JSObject
C. JavaObject
D. Jobject
42. _______ class provides an interface for invoking JavaScript methods and examining JavaScript properties.
A. ScriptObject
B. JSObject
C. JavaObject
D. Jobject
43. _________ is a wrapped Java array, accessed from within JavaScript code.
A. JavaArray
B.  JavaClass
C. JavaObject
D. JavaPackage
              Â