InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which of the following is a web application API framework?(a) Dojo(b) YUI(c) GWT(d) jQueryThe question was posed to me by my school teacher while I was bunking the class.I need to ask this question from Client-Side Frameworks topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right answer is (C) GWT |
|
| 2. |
Which of the following framework was used by Google for Gmail?(a) Dojo(b) GWT(c) Closure(d) YUIThis question was posed to me in an internship interview.The above asked question is from Client-Side Frameworks in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct option is (c) Closure |
|
| 3. |
What are the two incompatible versions of YUI?(a) YUI1 and YUI2(b) YUI2 and YUI4(c) YUI1 and YUI3(d) YUI2 and YUI3The question was asked during an interview for a job.My question comes from Client-Side Frameworks in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct choice is (a) YUI1 and YUI2 |
|
| 4. |
What does Dojo and YUI have in common?(a) Facilitates DOM utilities and UI Widgets(b) Does not facilitates DOM utilities and UI Widgets(c) Client-side library(d) Server-side libraryThe question was posed to me in final exam.My question is based upon Client-Side Frameworks in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct CHOICE is (a) Facilitates DOM utilities and UI Widgets |
|
| 5. |
What is the purpose of the Dojo framework?(a) Focuses on DOM and Ajax utilities(b) Advertises incredible depth(c) Ajax utilities(d) ModularI have been asked this question in an international level competition.Enquiry is from Client-Side Frameworks topic in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right choice is (b) Advertises incredible DEPTH |
|
| 6. |
Which is the in-house library of Yahoo!?(a) Dojo(b) YUI(c) Prototype(d) ClosureI have been asked this question at a job interview.My enquiry is from Client-Side Frameworks topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct choice is (b) YUI |
|
| 7. |
Which of the following frameworks focuses on DOM and Ajax utilities?(a) jQuery(b) Prototype(c) Dojo(d) Both jQuery and PrototypeThis question was addressed to me during an interview.Origin of the question is Client-Side Frameworks topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct option is (d) Both jQuery and PROTOTYPE |
|
| 8. |
Which of the following is not a framework?(a) jQuery(b) .NET(c) JavaScript(d) CocoaI got this question in an internship interview.I'd like to ask this question from Client-Side Frameworks topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» RIGHT answer is (c) JavaScript The explanation is: ONE of the most POPULAR frameworks is jQuery which is used in WEB development. Here, JavaScript is a scripting language and not a framework. |
|
| 9. |
The libraries that build a new higher-level API for client-side programming is ____________(a) Library(b) Framework(c) APIs(d) ScriptI have been asked this question in an online quiz.I want to ask this question from Client-Side Frameworks topic in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct option is (b) Framework |
|
| 10. |
What is the JavaScript code snippet to find all container elements with class “reveal”?(a) var elements = document.getElementsByClassName(“reveal”);(b) var elements = document.getElementByClassName(“reveal”);(c) var elements = document.getElementByName(“reveal”);(d) var elements = document.getElementsClassName(“reveal”);I have been asked this question in an online quiz.This interesting question is from JavaScript in Web Browsers in division Server-Side and Client-Side Scripting of JavaScript |
|
Answer» CORRECT choice is (a) var elements = document.GETELEMENTSBYCLASSNAME(“reveal”); The best I can explain: The getElementsByClassName() method RETURNS a collection of all elements in the document with the specified class NAME, as a NODELIST object. The above code snippet finds all container elements with class “reveal”. |
|
| 11. |
Which of the following is not an object?(a) Element(b) Location(c) Position(d) WindowThis question was posed to me in a national level competition.This intriguing question originated from JavaScript in Web Browsers topic in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct choice is (c) Position |
|
| 12. |
What is the JavaScript code snippet to update the content of the timestamp element when the user clicks on it?(a) timestamp.onLoad = function() { this.innerHTML = new Date().toString(); }(b) timestamp.onclick = function() { this.innerHTML = new Date().toString(); }(c) timestamp.onload = function() { this.innerHTML = new Date().toString(); }(d) timestamp.onclick = function() { innerHTML = new Date().toString(); }The question was posed to me in final exam.Question is from JavaScript in Web Browsers in division Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct ANSWER is (b) timestamp.onclick = function() { this.innerHTML = new Date().toString(); } |
|
| 13. |
When a program contains extensive use of event handlers, which of the following is necessary?(a) Modular functions(b) Nested functions(c) Split up programs(d) Global variablesThis question was posed to me during an interview for a job.This interesting question is from JavaScript in Web Browsers topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct option is (b) Nested FUNCTIONS |
|
| 14. |
Which handler is triggered when the content of the document in the window is stable and ready for manipulation?(a) onload(b) manipulate(c) create(d) onkeypressThis question was posed to me by my college director while I was bunking the class.This interesting question is from JavaScript in Web Browsers topic in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct choice is (a) ONLOAD |
|
| 15. |
What is the purpose of the event handlers in the JavaScript?(a) Adds innerHTML page to the code(b) Performs handling of exceptions and occurrences(c) Allows JavaScript code to alter the behaviour of windows(d) Change the server locationThis question was posed to me by my school teacher while I was bunking the class.Origin of the question is JavaScript in Web Browsers topic in division Server-Side and Client-Side Scripting of JavaScript |
|
Answer» RIGHT OPTION is (c) Allows JavaScript code to alter the BEHAVIOUR of windows The explanation: Event handlers ALLOW JavaScript code to alter the BEHAVIOR of windows, of documents, and of the elements that make up those documents. |
|
| 16. |
What are the properties supporting CSS styles for a document element?(a) style and font(b) style and className(c) size and style(d) className and fontI have been asked this question in an international level competition.This key question is from JavaScript in Web Browsers topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct option is (B) style and className |
|
| 17. |
Which of the following object belongs to the style property?(a) Element(b) Window(c) Location(d) DynamicI got this question in an internship interview.My question is based upon JavaScript in Web Browsers topic in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right ANSWER is (a) Element |
|
| 18. |
What is the property to access the first child of a node?(a) timestamp.Child1(b) timestamp.Child(1)(c) timestamp.Child(0)(d) timestamp.firstChildThe question was asked during an online interview.I'd like to ask this question from JavaScript in Web Browsers in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct answer is (d) timestamp.firstChild |
|
| 19. |
Which is the property that represents the content displayed in the window?(a) document(b) content(c) window(d) frameThis question was addressed to me in a national level competition.Question is from JavaScript in Web Browsers topic in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right answer is (a) DOCUMENT |
|
| 20. |
When will the window property come into play?(a) Representation convenience(b) Use as an extension of other objects(c) Use objects in the Window object(d) Refer to window object itselfI have been asked this question in quiz.My doubt stems from JavaScript in Web Browsers in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» CORRECT CHOICE is (d) Refer to window object itself To explain I WOULD say: The Window object has a property NAMED window that always refers to itself. You can use this property if you need to refer to the window object itself. |
|
| 21. |
The setTimeout() method is used to _______________(a) Make the event sleep(b) Register a function to be invoked after a certain time(c) Invoke an event after a certain time(d) Time for iterationThe question was posed to me by my school teacher while I was bunking the class.The above asked question is from JavaScript in Web Browsers in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct answer is (b) Register a FUNCTION to be INVOKED after a certain time |
|
| 22. |
Which of the following is a global object?(a) Register(b) Location(c) Window(d) PositionI have been asked this question in an international level competition.Query is from JavaScript in Web Browsers in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct OPTION is (C) Window |
|
| 23. |
Which Window object method is used to display a message in a dialog box?(a) alert()(b) prompt()(c) message()(d) console.logThe question was posed to me in homework.Query is from JavaScript in Web Browsers in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right option is (a) ALERT() |
|
| 24. |
Which property in the Window object is used to refer to a Location object?(a) position(b) area(c) window(d) locationThis question was posed to me by my school principal while I was bunking the class.This key question is from JavaScript in Web Browsers in division Server-Side and Client-Side Scripting of JavaScript |
|
Answer» CORRECT answer is (d) LOCATION To explain I would say: The Window object defines properties like location, which REFERS to a Location object that specifies the URL currently DISPLAYED in the window and allows a script to LOAD a new URL into the window. The window.location object can be used to get the current page address (URL) and to redirect the browser to a new page. |
|
| 25. |
Which identifier is used to represent a web browser window or frame?(a) frames(b) window(c) location(d) frameThe question was asked in final exam.Asked question is from JavaScript in Web Browsers in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct answer is (B) WINDOW |
|
| 26. |
Which object is the main entry point to all client-side JavaScript features and APIs?(a) Standard(b) Location(c) Window(d) PositionI had been asked this question during an interview.My doubt is from JavaScript in Web Browsers in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct option is (C) Window |
|
| 27. |
What is the code to start displaying the time when the document loads?(a) onload = displayTime;(b) window. = displayTime;(c) window.onload = displayTime;(d) window.onload = start;This question was posed to me in an interview for job.My doubt is from Embedding JavaScript in HTML topic in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct answer is (c) window.onload = displayTime; |
|
| 28. |
What will be done if more than one page requires a file of JavaScript code?(a) Downloads that many times(b) Retrives from the browser cache(c) Must be re executed(d) Must be included in all the pagesThis question was posed to me in an international level competition.This interesting question is from Embedding JavaScript in HTML topic in division Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right option is (b) Retrives from the browser cache |
|
| 29. |
The word “document” mainly refers to ______________(a) Dynamic Information(b) Static Information(c) Both Dynamic and Static Information(d) Temporary informationThe question was asked by my college director while I was bunking the class.I would like to ask this question from JavaScript in Web Browsers topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The CORRECT choice is (B) Static Information |
|
| 30. |
What is the default value of the type attribute?(a) text/css(b) text/javascript(c) html(d) xmlI had been asked this question by my college director while I was bunking the class.This intriguing question originated from Embedding JavaScript in HTML topic in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» RIGHT answer is (b) text/javascript Easy explanation: The default VALUE of the TYPE ATTRIBUTE is “text/javascript”. You can SPECIFY this type explicitly if you want, but it is never necessary. |
|
| 31. |
One of the main advantage of using src attribute is ____________(a) It becomes self-cached(b) It makes the HTML file modular(c) It restricts manipulation in the HTML file(d) It simplifies the HTML filesI got this question by my school principal while I was bunking the class.My question is from Embedding JavaScript in HTML in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right OPTION is (d) It simplifies the HTML files |
|
| 32. |
What is the code for getting the current time?(a) now = new Date();(b) var now = new Date();(c) var now = Date();(d) var now = new Date(current);The question was posed to me by my college director while I was bunking the class.This question is from Embedding JavaScript in HTML topic in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct answer is (b) var now = new Date(); |
|
| 33. |
Which is the root element in a HTML document?(a) HTML(b) HEAD(c) SCRIPT(d) BODYThis question was posed to me during an online interview.I'd like to ask this question from Embedding JavaScript in HTML in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct ANSWER is (a) HTML |
|
| 34. |
Which character in JavaScript code will be interpreted as XML markup?(a) !(b) >(c) &(d) .I got this question by my college director while I was bunking the class.Asked question is from Embedding JavaScript in HTML topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» RIGHT option is (C) & To elaborate: If your JAVASCRIPT code contains the < or & characters, these characters are interpreted as XML MARKUP. Element tags must begin with the < character, and entities and character references in an XML document must begin with the & character. |
|
| 35. |
When does JavaScript code appear inline within an HTML file?(a) Between the “script” tag(b) Outside the “script” tag(c) Between or Outside the “script” tag(d) Between the header tagThis question was addressed to me in an online interview.My question is taken from Embedding JavaScript in HTML topic in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct option is (a) Between the “SCRIPT” TAG |
|
| 36. |
Which is the function used to retrieve a value?(a) get()(b) retrieve()(c) getItem()(d) retrieveItem()The question was asked by my college director while I was bunking the class.This interesting question is from Client-Side Storage in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right choice is (C) getItem() |
|
| 37. |
Which of the following is a way of embedding Client-side JavaScript code within HTML documents?(a) From javascript:encoding(b) External file specified by the src attribute of a “script” tag(c) By using a header tag(d) By using body tagI got this question during an online interview.I need to ask this question from Embedding JavaScript in HTML topic in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The CORRECT ANSWER is (b) External file SPECIFIED by the src attribute of a “script” tag |
|
| 38. |
What is the lifetime of the data stored through localStorage?(a) Permanent(b) Temporary(c) Both Permanent and Temporary at times(d) Cannot storeI had been asked this question during an interview for a job.The query is from Client-Side Storage topic in division Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct ANSWER is (a) Permanent |
|
| 39. |
What is the main difference between localStorage and sessionStorage?(a) Lifetime(b) Scope(c) Both Lifetime and Scope(d) Storage LocationI have been asked this question in class test.I want to ask this question from Client-Side Storage in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct option is (c) Both LIFETIME and Scope |
|
| 40. |
The localStorage and sessionStorage belongs to ___________(a) Window object(b) Element object(c) Hash object(d) DOM objectI have been asked this question in an internship interview.The query is from Client-Side Storage in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct choice is (a) WINDOW object |
|
| 41. |
Which is the most appropriate database for developers requiring a huge amount of data?(a) Database(b) Datawarehouse(c) Web databases(d) AccessI have been asked this question in a job interview.My enquiry is from Client-Side Storage topic in division Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct option is (C) Web databases |
|
| 42. |
Which object supports Filesystem API?(a) Element(b) File(c) Window(d) DOMThe question was posed to me during a job interview.I'd like to ask this question from Client-Side Storage topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct answer is (b) FILE |
|
| 43. |
Which is Microsoft’s own proprietary client-side storage?(a) IE User Data(b) Offline Web Applications(c) Cookies(d) Offline ApisThis question was addressed to me in my homework.Question is taken from Client-Side Storage in division Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct OPTION is (a) IE USER Data |
|
| 44. |
Which is the storage that allows the caching of web pages and their associated resources?(a) Web Databases(b) FileSystem API(c) Offline Web Applications(d) CookiesThis question was posed to me in a national level competition.I would like to ask this question from Client-Side Storage topic in division Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct answer is (c) Offline WEB Applications |
|
| 45. |
Which is not a form of client-side storage?(a) Web Databases(b) FileSystem API(c) Offline Web Applications(d) Online Web ApplicationsI got this question in an interview.I need to ask this question from Client-Side Storage in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right answer is (d) ONLINE Web Applications |
|
| 46. |
Why does Node not block while waiting for operations to complete?(a) Static(b) Asynchronous(c) Synchronous(d) RecursiveThis question was addressed to me in an international level competition.The query is from Asynchronous I/O with Rhino in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» RIGHT CHOICE is (b) Asynchronous Easy explanation: NODE executes the function the in one go without any waiting or blocking. Because the Node’s functions and methods are asynchronous, they do not block while waiting for operations to complete. |
|
| 47. |
The necessary globals of a node are defined under which namespace?(a) variables(b) system(c) process(d) usingI have been asked this question in examination.My question comes from Asynchronous I/O with Rhino in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right choice is (c) process |
|
| 48. |
Among the below given functions, Node supports which of the following client-side timer functions?(a) getInterval()(b) Interval()(c) clearTime()(d) clearTimeout()This question was posed to me in an online quiz.My question is from Asynchronous I/O with Rhino in division Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct choice is (d) clearTimeout() |
|
| 49. |
What is the code to print hello one second from now?(a) setTimeout(function() { console.log(“Hello World”); }, 1000);(b) setTimeout(function() { 1000, console.log(“Hello World”); });(c) setTimeout(function(1000) { console.log(“Hello World”); });(d) setTimeout(function() { console.log(“Hello World”); });I have been asked this question in an online interview.I'm obligated to ask this question of Asynchronous I/O with Rhino in division Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right CHOICE is (a) setTimeout(function() { console.log(“Hello WORLD”); }, 1000); |
|
| 50. |
What is the command used for debugging output in Node?(a) print();(b) console.log(…);(c) debug(…);(d) execute(…);I had been asked this question during an interview for a job.My doubt is from Asynchronous I/O with Rhino topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct ANSWER is (B) console.log(…); |
|