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

All modern browsers supports JS.



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

<script type="text/javascript">




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





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





Which of the following attribute can hold the JavaScript version?





Java Script have following type of Comment(s) -





A hexadecimal literal begins with





What is the correct syntax for referring to an external script called " abc.js"?





Which types of image maps can be used with JavaScript?





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

What will be the output of the following ?





The syntax of capture events method for document object is ______________





Variable declared inside JavaScript Function will be called as ____________.



Consider the following statements

var count = 0;
while (count < 10) 

In the above code snippet, what happens?





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



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





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





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

What is the output?





Integer Variable + Character Variable + Undefined Variable = ______________ Value





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





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





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





Local Variables are Destroyed as soon as ______________.





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





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



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?





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




JavaScript Statements are executed by ________ .





Choose the client-side JavaScript object?





Java Script Variable should be Case ___________.



Which of the following is not a compound assignment operator.





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





Variable declared outside JavaScript Function is called as _______________ .



Is it possible to nest functions in JavaScript?



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

Which of the statement will be neglected by Browser ?











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





Scripting language are




JavaScript is ideal to





JavaScript is interpreted by _________





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




Single Line Comment Starts with _________ Symbol.





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





Which was the first browser to support JavaScript ?





What does the tag do?





JavaScript Code can be called by using _________.





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





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





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

What will be printed ?




The statement a===b refers to





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





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

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






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





Consider the following statements


In the above switch syntax, the expression is compared with the case labels using which of the following operator(s) ?





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





JavaScript entities start with _______ and end with _________.





State the correct place of JS Code inside HTML -





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"


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





Is this placement of JS code inside HTML Element is Error Free ?

<html><head><title>My Page</title>
<a href="javascript:myFunction();">Click here</a>
<script language="javascript" type="text/javascript">
function myFunction() {
    alert('Hello world');




JavaScript is invented by ________.





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

This code will include External JS inside your webpage.



The output for the following code snippet would most appropriately be

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






What will be printed inside webpage ?

var message="Hello JS";






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



JS Comment can be used for following purposes





When there is an indefinite or an infinity value during an arithmetic value computation, javascript





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





Why JavaScript is called as Lightweight Programming Language ?





The script tag must be placed in





Which of the following is not considered a JavaScript operator?













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





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





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?





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





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





Executable single line of Script is called as _________________.





Which of the following is not a comparison operator ?






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




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





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



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





/* This is Simple Comment */

This is the example of ____________ Comment.



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





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

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






What will be the output of the following script ?

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







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





Why so JavaScript and Java have similar name?





<script type="text/javascript">

What will be the Output of the above Code ?





When an empty statement is encountered, a JavaScript interpreter





JavaScript code contain sequence of ___________.





Which of the following function of String object returns a string representing the specified object?





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





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





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





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



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





A statement block is a





Which of the following is not an logical operator ?





What are variables used for in JavaScript Programs?





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










The escape sequence ‘f’ stands for





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