Consider the following code snippet const pi=3.14; var pi=4; console.log(pi); What will be the output for the above code snippet?
1.This will flash an error
2.Prints 4
3.Prints 3.14
4.Ambiguity
How many parameters does the method plot() accept?
1. 7
2.8
3.9
4.10
If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?
1.para1="New Text"
2.para1.value="New Text";
3.para1.firstChild.nodeValue= "New Text";
4.para1.nodeValue="New Text";
JavaScript ignores?
1.spaces
2.tabs
3.newlines
4.All of the above
JavaScript is designed for following purpose -
1. to style HTML pages
2. to execute Queries related to databases on a server
3.to add interactivity to html pages
4.All of the above
What is the need for bubble charts?
1.Represent 2D data
2. Represent 3D data
3.Represent 2D and 3D data
4.Represents meta data
What should appear at the very end of your JavaScript? The <script language="javascript"> tag
1. <script>
2.<script>
3.</script language="javascript">
4.All of the above
Among the following, which one is a ternary operator in JavaScript? A.
1.#
2.::
3.&:
4.?:
Among the keywords below, which one is not a statement?
1.if
2.with
3.debugger
4.use strict
Choose the correct JavaScript syntax to change the content of the following HTML code.
1.document.getElement ("letsfindcourse").innerHTML = "I am a letsfindcourse";
2.document.getElementById ("letsfindcourse").innerHTML = "I am a letsfindcourse";
3.document.getId ("letsfindcourse") = "I am a letsfindcourse";
4.document.getElementById ("letsfindcourse").innerHTML = I am a letsfindcourse;
Consider the code snippet given below var count = [1,,3]; What is the observation made?
1.The omitted value takes "undefined"
2.This results in an error
3.This results in an exception
4.The omitted value takes an integer value
Does JavaScript allow exception handling?
1.Yes, it provides try, catch as well as throw key word for exception handling
2.Yes, but it provides only try block
3.Yes, but it provides only Try catch block, but does not allow throw exception
4.No
Find output of below code var a = '20'; var b = a = 30; document.write(a+b);
1. Error in Script
2.'20'30
3.2030
4.50
Find output of below Javascript addition code document.write("1 plus 1 is " + 1 + 1);
1.2
2.1 plus 1 is 2
3.1 plus 1 is 11
4.1 plus 1 is 1 + 1
From which version of IE is canvas supported?
1.6
2.7
3.8
4.9
HomeSite 5 is a well-liked HTML and JavaScript editor from Macromedia.
1.True
2.False
3.Can be true or false
4.Can not say
How ++ works in Javascript? Find output of below Javascript code. var a = 1; document.write(a--); document.write(a);
1.00
2.01
3.11
4.10
How do we define the term Thread?
1.Device that controls input
2.Variable that controls movement
3.Controlled execution of applications
4.None of the above
How to get a particular value using the tagged name?
1. getElementbyID()
2.getElementsbyName()
3.getElementsbyTagName()
4.getTagName()
Inside which HTML element do we put the JavaScript?
1.<script>
2.<head>
3.<meta>
4.<style>
JavaScript can be written __________
1.directly into JS file and included into HTML
2.directly on the server page
3.directly into HTML pages
4.directly into the css file
Javascript is ideal to?
1.make computations in HTML simpler
2.minimize storage requirements on the web server
3. increase the download time for the client
4.None of the mentioned
Microsoft has developed a popular HTML editor called?
1.Dreamweaver
2.FrontPage
3.HomeSite
4.Macromedia
Syntax for creating a RegExp object: 1. var txt=new RegExp(pattern,attributes); 2. var txt=/pattern/attributes; Which of the above mentioned syntax will correct?
1.1 only
2.2 only
3.Both 1 and 2
4.None of the above
The meaning for Augmenting classes is that:
1.objects inherit prototype properties even in dynamic state
2. objects inherit prototype properties only in dynamic state
3.objects inherit prototype properties in static state
4.object doesn’t inherit prototype properties in static state
The pop() method of the array does which of the following task ?
1.decrements the total length by 1
2.increments the total length by 1
3.prints the first element but no effect on the length
4.updates the element
The syntax of Eval is ________________
1. [objectName.]eval(numeric)
2.[objectName.]eval(string)
3.[EvalName.]eval(string)
4.[EvalName.]eval(numeric)
The _______ method of an Array object adds and/or removes elements from an array.
1.Reverse
2.Shift
3.Slice
4.Splice
What are the three important manipulations done in a for loop on a loop variable in javascript?
1.the initialization, the Incrementation, and update
2. the initialization, the test, and the update
3.the initialization, the test, and Incrementation
4.All of the above
What are the two basic groups of dataypes in JavaScript?
1.Primitive
2.Reference types.
3.All of the above
4.None of the above
What are the types of Pop up boxes available in JavaScript?
1.Alert
2.Prompt
3.Confirm
4.All of the above
What does javascript use instead of == and !=?
1.It uses bitwise checking
2.It uses === and !== instead
3. It uses equals() and notequals() instead
4.It uses equalto()
What does the interpreter do when you reference variables in other scopes?
1.Traverses the queue
2.Traverses the stack
3. Finds the bugs
4.Traverse the array
What if we put ++ operator inside if condition? find the output of below code < script> var a = 10; if(a == a++) document.write(a);
1.Error
2.Nothing is printed
3.10
4.11
What if you use parseInt() to convert a string containing decimal value?
1.Throws Error
2. It returns the decimal values in string form
3.If returns only the integer portion of the number
4.None of the listed option
What if you use parseInt() to convert a string containing decimal value?
1.Throws Error
2.It returns the decimal values in string form
3.If returns only the integer portion of the number
4.None of the listed option
What is a closure?
1.Function objects
2.Scope where function’s variables are resolved
3.Both Function objects and Scope where function’s variables are resolved
4.Function return value
What is divide by 0 in Javascript? var a = 10; var b = 0; document.write(a/b);
1.Nothing is printed
2.0 is printed
3. Infinity is printed
4.Some Garbage Value
What is the correct syntax for referring to an external script called "LFC.js"?
1.<script src="LFC.js">
2.<script source="LFC.js">
3.<script ref="LFC.js">
4.<script type="LFC.js">
What is the default value of the asyc attribute?
1.0
2.1
3.False
4.True
what is the disadvantage of using innerHTML in JavaScript?
1.Content can not be replaced everywhere
2.We can use like "appending to innerHTML
3.Even if you use +=like "innerHTML = innerHTML + 'html'" still the old content is replaced by html
4.The entire innerHTML content is not re-parsed and build into elements, therefore its not slower
What is the original name of JavaScript?
1.LiveScript
2.EScript
3.Mocha
4.JavaScript
What is the output of below Javascript code? alert (typeof new Date() );
1.Throws Error
2.object
3. Displays Nothing
4.Current Date
What is the output of following Javascript? var a = 'letsfind'; var b = 'course'; var c = a/b; document.write(c);
1.letsfindcourse
2.letsfind/course
3.NaN
4.None of the above
What is the purpose of script loading?
1. Load Scripts programmatically
2.Load JavaScript files manually
3.Load JavaScript files programmatically
4.All of the mentioned
What is the purpose of the Attr object in the HTML DOM?
1.Used to focus on a particular part of the HTML page
2.HTML Attribute
3.Used to arrange elements
4.None of the mentioned
What is the purpose of the Attr object in the HTML DOM?
1. A. Used to focus on a particular part of the HTML page
2.HTML Attribute
3.Used to arrange elements
4.None of the mentioned
What must be done in order to implement Lexical Scoping?
1. Get the object
2.Dereference the current scope chain
3.Reference the current scope chain
4.Return the value
What must be done in order to implement Lexical Scoping?
1. Get the object
2.Dereference the current scope chain
3.Reference the current scope chain
4.Return the value
What will be the output of the following Javascript code? var string1 = "Letsfindcourse"; var intvalue = 30; alert( string1 + intvalue );
1. Letsfindcourse 30
2.30
3.Letsfindcourse30
4.Exception
What will be the return value of the write() method when the Node cannot write the data immediately and has to buffer it internally?
1. 0
2.1
3.True
4.False
What will happen if you reference document.location from within an object?
1.Traverses the queue
2.Finds the bugs
3.Traverses the stack
4.Traverses the array
When a class B can extend another class A, we say that:
1. A is the superclass and B is the subclass
2.B is the superclass and A is the subclass
3. Both A and B are the superclass
4. Both A and B are the subclass
Which among the following POSIX signals generate events?
1.SIGDOWN
2.SIGFLOAT
3.SIGINT
4.SIGSHORT
Which company developed JavaScript?
1.Netscape
2.Bell Labs
3.Sun Microsystems
4.IBM
Which is the handler method used to invoke when uncaught JavaScript exceptions occur?
1.Onhalt
2.Onerror
3.Both onhalt and onerror
4.Onsuspend
Which is the method invoked to connect the last vertex back to the first?
1. closePath()
2.close()
3.connectlast(first)
4. connect()
Which method receives the return value of setInterval() to cancel future invocations?
1.clearInvocation()
2.cancelInvocation()
3.clearInterval()
4. clear()
which of the following are advantages of JavaScript?
1.Less server interaction
2.Increased interactivity
3.Richer interfaces
4.All of the above
Which of the following are the functional components in JavaScript?
1.First-class functions
2.Encapsulated-class functions
3.Fixed-class functions
4.All of the above
Which of the following function of Array object applies a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value?
1.pop()
2.reduce()
3.push()
4.reduceRight()
Which of the following is correct about features of JavaScript?
1.It can not Handling dates and time.
2.JavaScript is a object-based scripting language.
3.JavaScript is not interpreter based scripting language.
4.All of the above
Which of the following is not JavaScript Data Types?
1.Undefined
2.Number
3.Boolean
4.Float
Which of the following is not Javascript frameworks or libraries?
1.Polymer
2.Meteor
3.Cassandra
4.jQuery
Which of the following is not the properties of screen objects in JavaScript?
1.AvailHeight
2.ColorsDepth
3.AvailWidth
4.ColorDepth
Which of the following is the correct syntax to display "Letsfindcourse" in an alert box using JavaScript?
1.alert-box("Letsfindcourse"); B.
2.confirm("Letsfindcourse");
3.msgbox("Letsfindcourse");
4.alert("Letsfindcourse");
Which of the following is true?
1. If onKeyDown returns false, the key-press event is cancelled.
2. If onKeyPress returns false, the key-down event is cancelled.
3. If onKeyDown returns false, the key-up event is cancelled.
4. If onKeyPress returns false, the key-up event is canceled.
Which of the following method checks if its argument is not a number?
1.isNaN()
2. nonNaN()
3.NaN()
4.None of the above
Which of the following true about Javascript?
1. A. Client-side JavaScript does not allow the reading or writing of files
2. JavaScript cannot be used for networking applications
3.JavaScript doesn't have any multi-threading or multiprocessor capabilities
4.All of the above
Which symbol is used for comments in Javascript?
1.\
2. //
3.* *
4. * */
Which tag(s) can handle mouse events in Netscape?
1. <IMG>
2.<A>
3. <BR>
4.<span>
Why so JavaScript and Java have similar name?
1.JavaScript is a stripped-down version of Java .
2. JavaScript's syntax is loosely based on Java's
3.They both originated on the island of Java
4.None of the above