Dear readers, these JavaScript Questions and Answers have been designed specially to get you acquainted with the nature of questions you may encounter during your Job interview for the subject of JavaScript. As per my experience good interviewers hardly plan to ask any particular question during your Job interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answers:
a. Scripting
b. Programming
c. Both a and b
d. Application
Answer : a
a. Server
b. Client
c. ISP
d. Browser
Answer : d
a. Using document object
b. Registering appropriate event handlers
c. Using element object
d. All of the mentioned
Answer : b
a. XMLHttpResponse
b. XMLRequest
c. XMLHttpRequest
d. All of the mentioned
Answer : c
a. Data storage
b. Graphics APIs
c. Other APIs for web apps
d. All of the mentioned
Answer : d
a. Data storage
b. Networking
c. XMLHttpRequest object
d. None of the mentioned
Answer : d
a. Non-inline
b. External
c. Referenced
d. Inline
Answer : d
a. A URL that uses the special javascript:encoding
b. A URL that uses the special javascript:stack
c. A URL that uses the special javascript:protocol
d. A URL that uses the special javascript:code
Answer : c
a. Unobtrusive JavaScript
b. Obtrusive JavaScript
c. Inherited JavaScript
d. Modular JavaScript
Answer : a
a. Static Web Pages
b. Interactive Web Pages
c. Conditional Web Pages
d. None of the mentioned
Answer : b
A. <SCRIPT>
B. <BODY>
C. <HEAD>
D. <TITLE>
Ans: A
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
Ans: A
A. LANGUAGE
B. SCRIPT
C. VERSION
D. None of the above
Ans: A
A. System.out.println("Hello World")
B. println ("Hello World")
C. document.write("Hello World")
D. response.write("Hello World")
Ans: C
A. <LANGUAGE="JavaScriptVersion">
B. <SCRIPT LANGUAGE="JavaScriptVersion">
C. <SCRIPT LANGUAGE="JavaScriptVersion"> JavaScript statements…</SCRIPT>
D. <SCRIPT LANGUAGE="JavaScriptVersion"!> JavaScript statements…</SCRIPT>
Ans: C
A. <js>
B. <scripting>
C. <script>
D. <javascript>
Ans: C
A. <script href=" abc.js">
B. <script name=" abc.js">
C. <script src=" abc.js">
D. None of the above
Ans: C
A. Server-side image maps
B. Client-side image maps
C. Server-side image maps and Client-side image maps
D. None of the above
Ans: B
A. navigator.appCodeName
B. navigator.appName
C. navigator.appVersion
D. None of the above
Ans: A
A. var txt = new Array(1:"tim",2:"kim",3:"jim")
B. var txt = new Array:1=("tim")2=("kim")3=("jim")
C. var txt = new Array("tim","kim","jim")
D. var txt = new Array="tim","kim","jim"
Ans: C
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
Ans: A
A. "New Text"?
B. para1.value="New Text";
C. para1.firstChild.nodeValue= "New Text";
D. para1.nodeValue="New Text";
Ans: B
A. Semicolon, colon
B. Semicolon, Ampersand
C. Ampersand, colon
D. Ampersand, semicolon
Ans: D
A. a low-level programming language.
B. a scripting language precompiled in the browser.
C. a compiled scripting language.
D. an object-oriented scripting language.
Ans: D
A. FileUpLoad
B. Function
C. File
D. Date
Ans: C
A. Database
B. Cursor
C. Client
D. FileUpLoad
Ans: D
A. new
B. this
C. delete
D. typeof
Ans: B
A. Eval
B. ParseInt
C. ParseFloat
D. Efloat
Ans: A
A. onfocus
B. onblur
C. onclick
D. ondblclick
Ans: B
A. [objectName.]eval(numeriC.
B. [objectName.]eval(string)
C. [EvalName.]eval(string)
D. [EvalName.]eval(numeriC.
Ans: B
A. Client
B. Server
C. Object
D. None of the above
Ans: A
A. Select
B. If
C. Switch
D. For
Ans: B
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>->}
D. if (conditional expression is true) then {execute this code}
Ans: C
A. dateObjectName = new Date([parameters])
B. dateObjectName.new Date([parameters])
C. dateObjectName := new Date([parameters])
D. dateObjectName Date([parameters])
Ans: A
A. Reverse
B. Shift
C. Slice
D. Splice
Ans: D
A. window.captureEvents(Event.CLICK);
B. window.handleEvents (Event.CLICK);
C. window.routeEvents(Event.CLICK );
D. window.raiseEvents(Event.CLICK );
Ans: A
A. <IMG>
B. <A>
C. <BR>
D. None of the above
Ans: B
A. Pathname
B. Protocol
C. Defaultstatus
D. Host
Ans: C
A. ENABLE_TAINT
B. MS_ENABLE_TAINT
C. NS_ENABLE_TAINT
D. ENABLE_TAINT_NS
Ans: C
A. a wrapper
B. a link
C. a cursor
D. a form
Ans: A
A. ScriptObject
B. JSObject
C. JavaObject
D. Jobject
Ans: B
A. ScriptObject
B. JSObject
C. JavaObject
D. Jobject
Ans: B
A. JavaArray
B. JavaClass
C. JavaObject
D. JavaPackage
Ans: A
A. JavaArray
B. JavaClass
C. JavaObject
D. JavaPackage
Ans: B
A. netscape.javascript.JSObject
B. netscape.javascript.JSException
C. netscape.plugin.JSException
D. None of the above
Ans: B
A. user_pref(" javascript.console.open_on_error", false);
B. user_pref("javascript.console.open_error ", true);
C. user_pref("javascript.console.open_error ", false);
D. user_pref("javascript.console.open_on_error", true);
Ans: D
A. user_pref("javascript.classic.error_alerts", true);
B. user_pref("javascript.classic.error_alerts ", false);
C. user_pref("javascript.console.open_on_error ", true);
D. user_pref("javascript.console.open_on_error ", false);
Ans: A
A. Blur()
B. Blur(contrast)
C. Blur(value)
D. Blur(depth)
Ans: A
A. captureEvents()
B. captureEvents(args eventType)
C. captureEvents(eventType)
D. captureEvents(eventVal)
Ans: C
A. Close(doC.
B. Close(object)
C. Close(val)
D. Close()
Ans: D