Development - Java Script Test

Test Instructions :

1. The Test is 1hr duration.
2. The Test Paper consists of 30 questions. The maximum marks are 30.
3. All the questions are multiple choice question type with three options for each question.
4. Out of the three options given for each question, only one option is the correct answer.
5. Each question is allotted 1 mark for each correct response.
6. 0.25 will be deducted for incorrect response of each question.
Start Test

   Time Left : 00 : 30    : 00

_________ is a wrapped Java array, accessed from within JavaScript code.





Which attribute is used to specifies that the script is executed when the page has finished parsing (only for external scripts)





What will be the output of the following script ?

<!DOCTYPE html>
            var x = 5;
            document.write(x == "5");







If a string cannot be converted to a number __________ will be returned.





In JavaScript, _________ is an object of the target language data type that encloses an object of the source language.





JavaScript is a _______________ language





The output for the following code snippet would most appropriately be

var a=5 , b=1
var obj = { a : 10 }






/* This is Simple Comment */

This is the example of ____________ Comment.



JavaScript is ______ Side Scripting Language.





<script type="text/javascript">
    var name;
    name = "Pritesh";
<script type="text/javascript">

What will be the output of the following ?





JavaScript was invented at _______ Lab .





A conditional expression is also called a





Choose the server-side JavaScript object?





            var x = 5;
            var y = 6;
            document.write((x + y) + "<br>");

What will be the output of the following code ?





Multiple JS statements are written inside pair of ________ to form a statement block.





<script type="text/javascript">
        document.Write("<h1>This is a heading</h1>");

Above Code contain one executive Statement. Guess the Output of the Above Code.





Spaces,Punctuation marks are called as __________ Symbols in JavaScript.





Local Variables are Destroyed as soon as ______________.





Which best explains getSelection()?





When a JavaScript object is sent to Java, the runtime engine creates a Java wrapper of type ___________





Is this correct syntax to include JS Code inside HTML Page ?

<script type="text/javascript">




When an empty statement is encountered, a JavaScript interpreter





What are variables used for in JavaScript Programs?





______method evaluates a string of JavaScript code in the context of the specified object.





In March 1996, _______________ was released, featuring support for JavaScript.





Local Variables are destroyed after execution of function.



What will be the output of the following script ?

<!DOCTYPE html>
            var x = 5;
            document.write(x === "5");






JS Comment can be used for following purposes





JavaScript entities start with _______ and end with _________.





Which is a more efficient code snippet ?

Code 1 :

for(var num=10;num>=1;num--)

Code 2 :

var num=10;






"++" can operate only on ________________.





Which of the following operator is used to concatenate two strings.





JS code included inside head section is loaded before loading page.



Integer Variable is declared using following syntax in JavaScript.


Integer num;



var num;



int num;



integer num;


Variable declared without a value will have the value ______________.Eg.

var num;








____________ is the tainted property of a window object.





Which is the correct way to write a JavaScript array?


var txt = new Array(1:"tim",2:"kim",3:"jim")



var txt = new Array:1=("tim")2=("kim")3=("jim")



var txt = new Array("tim","kim","jim")



var txt = new Array="tim","kim","jim"


Which types of image maps can be used with JavaScript?





We can declare all type of variables in JavaScript with the keyword _____________.





If the values on either side of '+' operator are numerical values then ___________.




Which of the following statement is used to declare variable in JavaScript ?





var num;

Above Statement is called as __________ Statement.





How does JavaScript store dates in a date object? 





If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?





The JavaScript exception is available to the Java code as an instance of __________





Scripting language are




Group of JavaScript Statements is called as _________.





Comments in JS are ignored by ____________.





______ attribute is used to specify the character encoding used in an external script file.





Java Script have following type of Comment(s) -





To enable data tainting, the end user sets the _________ environment variable.





We cannot Place JS Code in the body tag . Say true/false.



"+=" operator can operate on following data values.





The enumeration order becomes implementation dependent and non-interoperable if :





Why so JavaScript and Java have similar name?





During addition of two numbers , suppose one of the number is NaN then output of the following code will be ?





What will be printed inside webpage ?

var message="Hello JS";






Vriables declared inside function are visible _______________.





<script type="text/javascript">
var s = "9123456 or 80000?";
var pattern = /\d{4}/;
var output = s.match(pattern);

What is the output?





What does the tag do?





The escape sequence ‘f’ stands for





<script language="javascript">
function x()

What is the output?





The statement a===b refers to





<script type="text/javascript">

What will be the Output of the above Code ?





"async" attribute is used to include External JS Code Asynchronously.

<script src="main.js" async="async"></script>




Which was the first browser to support JavaScript ?





Variable can hold ________ value at a time





Executable single line of Script is called as _________________.





What type of value gets printed if we add following two variables.

var a = "1";
var b = 5;






The _______ method of an Array object adds and/or removes elements from an array.





A hexadecimal literal begins with





Comment Statement is _________________ type of statement.





The “var” and “function” are





JavaScript is Case Sensitive !!Say True or False



JavaScript Code can be called by using _________.





When you assign a text value to a variable, we put text value in the pair of _________.




-Infinity in JS gets added with +Infinity then output of the code will be.




JavaScript was originally developed under the name _______.





JavaScript code contain sequence of ___________.






What is the output?




_______ class provides an interface for invoking JavaScript methods and examining JavaScript properties.





What will be the value of Variable - "num3" ?

var num1; 
var num2 = 10;
var num3 = num1 + num2;






To automatically open the console when a JavaScript error occurs which of the following is added to prefs.js?





"Add and Assignment" operator is shown by this symbol.





To open a dialog box each time an error occurs, which of the following is added to prefs.js?





"++" is __________ type of operator.





Is it necessary to use "var" keyword while declaring variable.



The type of a variable that is volatile is





Integer Variable + Character Variable + Undefined Variable = ______________ Value





Java Script Variable should be Case ___________.



Which of the following attribute can hold the JavaScript version?





JavaScript is also called as _____________.





The syntax of capture events method for document object is ______________





Variable name contain following type of characters -1. Alphabet2. Digits3. Underscore4. Special ChractersSelect the correct option.





+Infinity in JS gets added with +Infinity then output of the code will be -




var var1 = "Pritesh";

Above variable can store value of type.





JavaScript is invented by ________.





To set up the window to capture all Click events, we use which of the following statement?





When a user views a page containing a JavaScript program, which machine actually executes the script?





Which of the following navigator object properties is the same in both   Netscape and IE?





  • Click the 'Submit Test' button given in the bottom of this page to Submit your answers.
  • Test will be submitted automatically if the time expired.
  • Don't refresh the page.