Javascript Objective Questions And Answers

More interview questions and answers

What is the Keyword?

Why we use NAN function?

Write Boolean Operator that was supported in JavaScript?

What is the negative infinity?

JavaScript is developed by a. Brendan Eich b. Tim Duncan c. Bjarne Stroustrup d. Denish Richie

JavaScript is widely used for a. server-side web development b. client-side web development c. both client-side and server-side web development

JavaScript introduced by a. Microsoft b. IBM c. Google d. Sun Microsystem

First name of JavaScript is a. Oak b. Mocha c. JScript d. JSL

Using which tag we insert an JavaScript in HTML page? a. b. c. d.

Write syntax to get "R4R Welcomes you!" with using JavaScript? a. document.write("R4R Welcomes You!") b. print("R4R Welcomes You!") c. print.write("R4R Welcomes You!") d. script.write("R4R Welcomes You!")

We use tag within a. b. c. d. <JavaScript></a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=4352&option=JAVASCRIPT OBJ" class="topic">Which popup box you use to verify something from user? a. alert("Write some text here") b. confirm("Write some text here") c. prompt("Write here some text","Write default value here") </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=4353&option=JAVASCRIPT OBJ" class="topic">Which popup box you use when want some information comes from user? a. alert("Write some text here") b. confirm("Write some text here") c. prompt("Write here some text","Write default value here") </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=4354&option=JAVASCRIPT OBJ" class="topic">Which popup box you use when want a value from user before open a page? a. alert("Write some text here") b. confirm("Write some text here") c. prompt("Write here some text","Write default value here") </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7142&option=JAVASCRIPT OBJ" class="topic">______ JavaScript is also called client-side JavaScript. </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7143&option=JAVASCRIPT OBJ" class="topic">__________ JavaScript is also called server-side JavaScript. A. Microsoft B. Navigator C. LiveWire D. Native </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7144&option=JAVASCRIPT OBJ" class="topic">What are variables used for in JavaScript Programs? A. Storing numbers, dates, or other values B. Varying randomly C. Causing high-school algebra flashbacks D. None of the above </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7145&option=JAVASCRIPT OBJ" class="topic">_____ JavaScript statements embedded in an HTML page can respond to user events such as mouse-clicks, form input, and page navigation. A. Client-side B. Server-side C. Local D. Native </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7146&option=JAVASCRIPT OBJ" class="topic">What should appear at the very end of your JavaScript? The <script LANGUAGE="JavaScript">tag A. The </script> B. The <script> C. The END statement D. None of the above </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7147&option=JAVASCRIPT OBJ" class="topic">Which of the following can't be done with client-side JavaScript? A. Validating a form B. Sending a form's contents by email C. Storing the form's contents to a database file on the server D. None of the above </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7148&option=JAVASCRIPT OBJ" class="topic">Which of the following are capabilities of functions in JavaScript? A. Return a value B. Accept parameters and Return a value C. Accept parameters D. None of the above </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7149&option=JAVASCRIPT OBJ" class="topic">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 </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7150&option=JAVASCRIPT OBJ" class="topic">What is the correct JavaScript syntax to write \"Hello World\"? A. System.out.println(\"Hello World\") B. println (\"Hello World\") C. document.write(\"Hello World\") D. response.write(\"Hello World\") </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7151&option=JAVASCRIPT OBJ" class="topic">Which of the following way can be used to indicate the LANGUAGE attribute? A. <LANGUAGE=\"JavaScriptVersion\"> B. <SCRIPT LANGUAGE=\"JavaScriptVersion\"> C. <SCRIPT LANGUAGE=\"JavaScriptVersion\"> JavaScript statements�</SCRIPT> D. <SCRIPT LANGUAGE=\"JavaScriptVersion\"!> JavaScript statements</SCRIPT> </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7152&option=JAVASCRIPT OBJ" class="topic">What is the correct syntax for referring to an external script called \" abc.js\"? A. <script href=\" abc.js\"> B. <script name=\" abc.js\"> C. <script src=\" abc.js\"> D. None of the above </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7153&option=JAVASCRIPT OBJ" class="topic">Which types of image maps can be used with JavaScript? 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 </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7154&option=JAVASCRIPT OBJ" class="topic">Which of the following navigator object properties is the same in both Netscape and IE? A. navigator.appCodeName B. navigator.appName C. navigator.appVersion D. None of the above </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7155&option=JAVASCRIPT OBJ" class="topic">Which is the correct way to write a JavaScript array? 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\" </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7156&option=JAVASCRIPT OBJ" class="topic">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 </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7157&option=JAVASCRIPT OBJ" class="topic">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\"; </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7158&option=JAVASCRIPT OBJ" class="topic">JavaScript entities start with _______ and end with _________. A. Semicolon, colon B. Semicolon, Ampersand C. Ampersand, colon D. Ampersand, semicolon </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7159&option=JAVASCRIPT OBJ" class="topic">Which of the following best describes JavaScript? 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 </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7160&option=JAVASCRIPT OBJ" class="topic">Choose the server-side JavaScript object? A. FileUpLoad B. Function C. File D. Date </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7161&option=JAVASCRIPT OBJ" class="topic">Choose the client-side JavaScript object? A. Database B. Cursor C. Client D. FileUpLoad </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7162&option=JAVASCRIPT OBJ" class="topic">Which of the following is not considered a JavaScript operator? A. new B. this C. delete D. typeof </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7163&option=JAVASCRIPT OBJ" class="topic">______method evaluates a string of JavaScript code in the context of the specified object. A. Eval B. ParseInt C. ParseFloat D. Efloat </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7164&option=JAVASCRIPT OBJ" class="topic">Which of the following event fires when the form element loses the focus: <button>, <input>, <label>, <select>, <textarea>? A. onfocus B. onblur C. onclick D. ondblclick </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7165&option=JAVASCRIPT OBJ" class="topic">The syntax of Eval is ________________ A. [objectName.]eval(numeric) B. [objectName.]eval(string) C. [EvalName.]eval(string) D. [EvalName.]eval(numeric) </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7166&option=JAVASCRIPT OBJ" class="topic">JavaScript is interpreted by _________ A. Client B. Server C. Object D. None of the above </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7167&option=JAVASCRIPT OBJ" class="topic">Using _______ statement is how you test for a specific condition. A. Select B. If C. Switch D. For </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7169&option=JAVASCRIPT OBJ" class="topic">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>->} D. if (conditional expression is true) then {execute this code} </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7170&option=JAVASCRIPT OBJ" class="topic">How to create a Date object in JavaScript? A. dateObjectName = new Date([parameters]) B. Date([parameters]) C. dateObjectName := new Date([parameters]) D. dateObjectName Date([parameters]) </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7171&option=JAVASCRIPT OBJ" class="topic">The _______ method of an Array object adds and/or removes elements from an array. A. Reverse B. Shift C. Slice D. Splice </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7172&option=JAVASCRIPT OBJ" class="topic">To set up the window to capture all Click events, we use which of the following statement? A. window.captureEvents(Event.CLICK); B. window.handleEvents (Event.CLICK); C. window.routeEvents(Event.CLICK ); D. window.raiseEvents(Event.CLICK ); </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7173&option=JAVASCRIPT OBJ" class="topic">Which tag(s) can handle mouse events in Netscape? A. <IMG> B. <A> C. <BR> D. None of the above </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7176&option=JAVASCRIPT OBJ" class="topic">What is the tainted property of a window object. A. Pathname B. Protocol C. Defaultstatus D. Host </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7177&option=JAVASCRIPT OBJ" class="topic">To enable data tainting, the end user sets the _________ environment variable. A. ENABLE_TAINT B. MS_ENABLE_TAINT C. NS_ENABLE_TAINT D. ENABLE_TAINT_NS </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7178&option=JAVASCRIPT OBJ" class="topic">In JavaScript, _________ is an object of the target language data type that encloses an object of the source language. A. a wrapper B. a link C. a cursor D. a form </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7179&option=JAVASCRIPT OBJ" class="topic">When a JavaScript object is sent to Java, the runtime engine creates a Java wrapper of type? A. Jobject B. ScriptObject C. JSObject D. JavaObject </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7180&option=JAVASCRIPT OBJ" class="topic">Which class provides an interface for invoking JavaScript methods and examining JavaScript properties. A. ScriptObject B. JSObject C. JavaObject D. Jobject </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7181&option=JAVASCRIPT OBJ" class="topic">Which is a wrapped Java array, accessed from within JavaScript code. A. JavaArray B. JavaClass C. JavaObject D. JavaPackage </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7182&option=JAVASCRIPT OBJ" class="topic">The JavaScript exception is available to the Java code as an instance of A. netscape.javascript.JSException B. netscape.javascript.JSObject C. netscape.plugin.JSException D. None of the above </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7183&option=JAVASCRIPT OBJ" class="topic">Automatically opened the console when a JavaScript error occurs which of the following is added to prefs.js? a. user_pref(\"javascript.console.open_on_error\", true); b. user_pref(\"javascript.console.open_error \", true); c. user_pref(\"javascript.console.open_error \", false); d. user_pref(\" javascript.console.open_on_error\", false); </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7184&option=JAVASCRIPT OBJ" class="topic">Which of the following is added to prefs.js,when open a dialog box each time an error occurs? a. user_pref(\"javascript.classic.error_alerts\", true); b. user_pref(\"javascript.classic.error_alerts \", false); c. user_pref(\"javascript.console.open_on_error \", false); d. user_pref(\"javascript.console.open_on_error \", true);</a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7185&option=JAVASCRIPT OBJ" class="topic">What is the syntax of a blur method in a button object is ... a. Blur() b. Blur(contrast) c. Blur(value) d. Blur(depth) </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7186&option=JAVASCRIPT OBJ" class="topic">The syntax of capture events method for document object is.. a. captureEvents(eventVal) b. captureEvents(args eventType) c. captureEvents(eventType) d. captureEvents() </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=7187&option=JAVASCRIPT OBJ" class="topic">What is the syntax of close method for document object is... a. Close(object) b. Close(doc) c. Close(val) d. Close() </a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=8796&option=JAVASCRIPT OBJ" class="topic"> Choose which of following supported in JavaScript 1.Classes 2.constructor 3.extends 4.static 5.All</a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=8797&option=JAVASCRIPT OBJ" class="topic">Which of following not used in Cookies 1.Expires ,Domain 2.Path ,Secure 3.Name=Value 4.All</a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=8798&option=JAVASCRIPT OBJ" class="topic">JavaScript Objects JavaScript Objects Object, Number Boolean, Strings Arrays, Date Math,RegExp ALL None</a></p></td></tr> <tr><td><p class="no_border"><a href="?qid=8799&option=JAVASCRIPT OBJ" class="topic">Choose correct syntax 1.var employee = new Object(); 3.var books = new Array("C++","R4R"); 3.var day = new Date("August 15, 2019"); 4.All</a></p></td></tr> </tbody> </table> <script src="/answer/jquery/jquery.min.js"></script> <script src="/answer/bootstrap/js/bootstrap.min.js"></script> <script src="/answer/datatable/jquery.dataTables.min.js"></script> <script src="/answer/datatable/dataTable.bootstrap.min.js"></script> <!-- generate datatable on our table --> <script> $(document).ready(function(){ //inialize datatable $('#myTable').DataTable(); //hide alert $(document).on('click', '.close', function(){ $('.alert').hide(); }) }); </script> <h2>Javascript Objective Questions And Answers</h2> <!--Footer --></td> </tr> </table></td> <td style="width:17%" valign="top"><div id="right_menu"> <div>R4R Topics</div> <p> <a href="" tabindex="1">C tutorial</a></p> <p> <a href="" tabindex="2">C++ tutorial </a></p> <p> <a href="" tabindex="4">Corejava</a></p> <p> <a href="" tabindex="3">Advanced java </a></p> <p> <a href="" tabindex="4">C# tutorial</a></p> <p> <a href="" tabindex="5">HTML</a></p> <p> <a href="" tabindex="6">CSS tutorial</a></p> <p> <a href="" tabindex="7"></a></p> <p> <a href="" tabindex="8">WCF tutorial</a></p> <p> <a href="" tabindex="9">WPF tutorial</a></p> <p> <a href="" tabindex="10">Struts tutorial</a></p> <p> <a href="" tabindex="10">Spring</a></p> <p> <a href="" tabindex="11">Hibernate</a></p> <p> <a href="" tabindex="12">Android</a></p> <p> <a href="" tabindex="13">Unix tutorial</a></p> <p> <a href="" tabindex="14">Linux tutorial</a></p> <p> <a href="" tabindex="14">SQL tutorial</a></p> <p> <a href="" tabindex="14">WEB technology</a></p> </div> </div> <div id="right_menu"> <div>Hot Topics</div> <p><a href="" tabindex="1" title="Database & SQL/PLSQL for freshers and experienced"> Database & SQL</a></p> <p><a href="" tabindex="1" title="HR FAQs for freshers and experienced"> HR FAQs</a></p> <p><a href="" tabindex="1" title="Interview & FAQs for freshers and experienced"> Interview & FAQs</a></p> <p><a href="" tabindex="1" title="ASK Questions ,freshers and experienced"> ASK Questions</a></p> <p><a href="" tabindex="1" title="PHP for freshers and experienced"> PHP</a></p> <p><a href="" tabindex="1" title="Testing for freshers and experienced"> Testing</a></p> </div> <div id="right_menu"> <div>More Links</div> <p><a href="" tabindex="1" title="Tutorials for freshers and experienced"> Tutorials</a></p> <p><a href="" tabindex="1" title="Articles for freshers and experienced"> Articles</a></p> <p><a href="" tabindex="1" title="Source Code for freshers and experienced"> Source Code</a></p> <p><a href="" tabindex="1" title="eBook for freshers and experienced"> e-Books</a></p> <p><a href="" tabindex="1" title="Certifications Study materials for freshers and experienced"> Certifications</a></p> <p><a href="" tabindex="1" title="FAQS for freshers and experienced"> FAQS</a></p> </div></td> </tr> </table> </div> <div class="footer"> <div class="footer_inner"> <table cellpadding="10px;"> <tr> <td> <p class="heading">Others</a></p> <p class="topic"><a href="">MCQs</a></p> <p class="topic"><a href="">Onlineexams</a></p> <p class="topic"><a href="">Videos</a></p> <p class="topic"><a href="">Chats </a></p> <p class="topic"><a href="">Forums</a></p> </td> <td> <p class="heading">Languages</a></p> <p class="topic"><a href="">JAVA Technology </a></p> <p class="topic"><a href="">PHP Language</a></p> <p class="topic"><a href="">C# Language</a></p> <p class="topic"><a href="">C++ Language</a></p> <p class="topic"><a href="">C Language</a></p> </td> <td> <p class="heading">Frameworks</p> <p class="topic"><a href="">Spring Framework</a></p> <p class="topic"><a href="">Struts Framework</a></p> <p class="topic"><a href="">.Net Framework</a></p> <p class="topic"><a href="">Hibernate Framework</a></p> <p class="topic"><a href="">ADO.Net Framework</a></p> </td> <td> <p class="heading">Web / Design</p> <p class="topic"><a href="">Hypertext Markup Language</a></p> <p class="topic"><a href="">Extensible Markup Language</a></p> <p class="topic"><a href="">Java Scripting Language</a></p> <p class="topic"><a href="">Cascading Style Sheet</a></p> <p class="topic"><a href="">Asynchronous Javascript & Xml</a></p> </td> <td><p class="heading">Mobile Technology</p> <p class="topic"><a href="">Android Technology</a></p> <p class="topic"><a href="">Android FAQS</a></p> <p class="topic"><a href="">J2ME(Java Micro Edittion)</a></p> <p class="topic"><a href="">J2ME Example</a></p> <p class="topic"><a href="">J2ME FAQS</a></p> </td> <td><p class="heading">Sql & Technology </p> <p class="topic"><a href="">SQL Server</a></p> <p class="topic"><a href="">Servlet Technology</a></p> <p class="topic"><a href="">Jsp Technology</a></p> <p class="topic"><a href="">Web Services</a></p> <p class="topic"><a href="">Testing Tutorial</a></p> </td> <td style="width:10%;"><p class="heading">R4R</p> <p class="topic"><a href="">About Us</a></p> <p class="topic"><a href="">Contact Us</a></p> <p class="topic"><a href="">Policy</a></p> <p class="topic"><a href="">T & C</a></p> <p class="topic"><a href="">Career</a></p> </td> </tr> </table> </div> <div class="site_footer"> <div class="copyright">Copyright ©2021-22, all rights reserved.</div> <div class="copyright"><a href="">Sitemap</a></div> <div class="copyright"><a href="">Career</a></div> <div class="copyright"><a href="">Post comment</a></div> <div class="copyright"><a href="">About us</a></div> </div> </div> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src=""></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-3662367-1'); </script> </BODY> </HTML>