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

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



JavaScript code contain sequence of ___________.





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

What is the output?





Integer Variable + Character Variable + Undefined Variable = ______________ Value





Which is a more efficient code snippet ?

Code 1 :

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

Code 2 :

var num=10;






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





JavaScript Statement may contain HTML Tags. Say True/False.



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?





var str = "Str";
var num = 10;
var output = str + num;

What will be the value of Variable 'output' ?





____________ is the tainted property of a window object.





JavaScript Code can be called by using _________.





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





The development environment offers which standard construct for data validation





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





Group of JavaScript Statements is called as _________.





What does the tag do?





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





Consider the following statements

var count = 0;
while (count < 10) 

In the above code snippet, what happens?





Which of the following attribute can hold the JavaScript version?





Which tag(s) can handle mouse events in Netscape?





What is mean by "this" keyword in javascript?





A hexadecimal literal begins with





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





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





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

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






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





Which of the following is not a comparison operator ?






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

What will be printed ?




var num;

Above Statement is called as __________ Statement.





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





Which of the following function of Array object returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found?





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





<script type="text/javascript">

What will be the Output of the above Code ?





Choose the server-side JavaScript object?





JavaScript is also called as _____________.





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





Comments in JS are ignored by ____________.





Which of the following is correct about features of JavaScript?





Variable declared outside JavaScript Function is called as _______________ .



Which types of image maps can be used with JavaScript?





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




<script type="text/javascript">

What is the output.?





Which best explains getSelection()?





In the below notation, Employee is of type { “Employee”: [ “Amy”, “Bob”, “John” ] }





The syntax of close method for document object is ______________





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





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





The script tag must be placed in





JavaScript syntax to change the content of the following HTML code





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





Assignment Operators is following type of operator ______________.





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

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






Vriables declared inside function are visible _______________.





Which of the following is not a compound assignment operator.





What will be the output of the following script ?

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







What will be printed on the screen ? Var3 =100101010





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





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

What will be the output of the following ?





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





The escape sequence ‘f’ stands for





JavaScript is ______ Side Scripting Language.





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

var num;








Which of the following is not considered as an error in JavaScript?





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

This code will include External JS inside your webpage.



JS Comment can be used for following purposes





The syntax of capture events method for document object is ______________





Using _______ statement is how you test for a specific condition.





Which of the following is not a JSON type?





Java Statement terminated by ______________ ,





"++" can operate only on ________________.





Variable can hold ________ value at a time





The “var” and “function” are





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





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





A statement block is a





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

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





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





<script type="text/javascript">
document.write("<h1>This is a heading</h1>");
document.write("<p>This is a paragraph.</p>");
document.write("<p>This is another paragraph.</p>");

HTML Tags are allowed inside JS. Is this error free code ?



Microsoft Developed a compatible dialect of JavaScript called _____________.





Local Variables are Destroyed as soon as ______________.






What is the output?




The syntax of Eval is ________________





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

Value of Z is





Is it possible to nest functions in JavaScript?



Which of the following event fires when the form element loses the focus: , , , , ?





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

Which of the statement will be neglected by Browser ?











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

<script type="text/javascript">




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





Which of the following is not an logical operator ?





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





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





"===" operator is _______________.





Executable single line of Script is called as _________________.





JavaScript was originally developed under the name _______.





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





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





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




/* This is Simple Comment */

This is the example of ____________ Comment.



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

What will be the output of the following code ?





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





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