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

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





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





Comment Statement is _________________ type of statement.





The syntax of close method for document object is ______________





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




Which company developed JavaScript?





What is the correct JavaScript syntax to write "Hello World"?





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





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




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

var num;








The syntax of a blur method in a button object is ______________





Choose the client-side JavaScript object?





Which best explains getSelection()?





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





The generalised syntax for a real number representation is





<!DOCTYPE html>
            var num1 = 1;
            var num2 = 1;
            var num3 = "1" + num1 + num2;
            document.write(num1 + "<br>");
            document.write(num2 + "<br>");
            document.write(num3 + "<br>");

Guess output of the following code.





Which of the following is considered as End of Single line comment ?





Which of the following Attribute is used to include External JS code inside your HTML Document -





Java Script have following type of Comment(s) -





Which JavaScript variable cannot be used as First character but can be use after first character ?





Which of the following is not a JSON type?





It is good to include JS code inside footer section in order to speed up the Page loading time of Webpage.



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"


JavaScript is invented by ________.





Which of the following is the structure of an if statement?





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





A hexadecimal literal begins with





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

What will be the output of the following ?





Guess the ternary operator used in the following example !!!

marks = (mark<35)?"Fail":"Pass";






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



        <title>A Simple Page</title>
        <script language="JavaScript">
            var A = "Compile ",
                B = "Error";
            C = A + B;
            //  -->

What will be printed ?




____________ is the tainted property of a window object.





Assignment Operators is following type of operator ______________.





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

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






JavaScript code contain sequence of ___________.





Integer Variable + Character Variable + Undefined Variable = ______________ Value





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





<script type="text/javascript">
// document.write("<h1>Heading</h1>");

Which of the statement will be neglected by Browser ?











Adding String and Integer always results in _________.





Scripting language are




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

What will be the output of the following code ?





Underscore can be used as first letter while declaring variable in JavaScript.



What will be the output of the following script ?

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







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

What is the output?





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





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

Guess output of the following code.










            var name = "John Doe";
            var name = 123;
            document.write(name + "<br>");

Is it possible to change the type of value after re-assignment.





What will be printed on the screen ? Var3 =100101010





Group of JavaScript Statements is called as _________.





Which of the following is not a compound assignment operator.





All modern browsers supports JS.



It is not necessary to write Semicolon at the end of JS statement !!



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

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




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





Initialization of variable can be done by writing _____ operator in between variable name and operand value.





Which of the following is not JavaScript Data Types?





We can declare ___________ at a time. Select most appropriate option.





JavaScript Code is written inside file having extension __________.





Variable can hold ________ value at a time





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





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





            var x = 12.45;
            var y = 1;
            var z = '8' + x + y;
            document.write(z + "<br>");

Value of Z is





One of the special features of an interpreter in reference with the for loop is that ___________





JavaScript is designed for following purpose 





The “var” and “function” are





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

This code will include External JS inside your webpage.



_____ JavaScript statements embedded in an HTML page can respond to user events such as mouse-clicks, form input, and page navigation.





Which of the following way can be used to indicate the LANGUAGE attribute?





JavaScript contains a _________________ that assigns a value to a variable based on some condition.





Which of the following operators not comes under assignment Operator ?Select all possible options.





"++" is __________ type of operator.





Variable declared outside JavaScript Function is called as _______________ .



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





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

<script type="text/javascript">




What does the tag do?





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





Which of the following is correct about features of JavaScript?





Person XYZ wrote his name and date of code creation at the start , What kind of comment he has written ?





JavaScript entities start with _______ and end with _________.





The escape sequence ‘f’ stands for





The main purpose of a “Live Wire” in NetScape is to





Multiple Declarations of variables are separated by ___________ symbol





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





The output for the following code snippet would most appropriately be

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






JavaScript is Case Sensitive !!Say True or False



JavaScript is a _______________ language





____________ is used to assign value to the variable.





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





Which of the following is not an logical operator ?





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

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






Consider the following statements

var count = 0;
while (count < 10) 

In the above code snippet, what happens?





The syntax of capture events method for document object is ______________





"++" can operate only on ________________.





JavaScript is interpreted by _________





Choose the server-side JavaScript object?





Which was the first browser to support JavaScript ?





Integer Variable is declared using following syntax in JavaScript.


Integer num;



var num;



int num;



integer num;


Variable declared inside JavaScript Function will be called as ____________.



In multiple line comment , End of the comment is specified by ________ Symbol.





JavaScript Code can be called by using _________.





  • 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.