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

JavaScript Code can be called by using _________.





JavaScript was originally developed under the name _______.





JavaScript Code can be called by using _________.





"++" is __________ type of operator.





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





What is mean by "this" keyword in javascript?





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

What is the output?





JavaScript is a _______________ language





JavaScript is designed for following purpose 





JavaScript Statements are executed by ________ .





State the correct place of JS Code inside HTML -





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



Choose the server-side JavaScript object?





Scripting language are




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





____________ is the tainted property of a window object.





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

What will be printed ?




The generalised syntax for a real number representation is





What does the tag do?





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





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





The type of a variable that is volatile is





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





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





Is it possible to nest functions in JavaScript?



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





What are variables used for in JavaScript Programs?





JavaScript is Case Sensitive !!Say True or False



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





Microsoft Developed a compatible dialect of JavaScript called _____________.





Variable declared outside JavaScript Function is called as _______________ .



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

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





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




Which of the following attribute can hold the JavaScript version?





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

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






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



var num;

Above Statement is called as __________ Statement.





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





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





Executable single line of Script is called as _________________.





Variable declared inside JavaScript Function will be called as ____________.



What will be the output of the following script ?

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






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

Guess output of the following code.





Conditional Operator shown in the following example is _____________.

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






The syntax of close method for document object is ______________





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

<script type="text/javascript">




var num=20;

Above Statement is called as __________ Statement. Select all the appropriate options.





Which best explains getSelection()?





Vriables declared inside function are visible _______________.





Non Initialized Variable have value "undefine", What value be printed in following case.

var carname="Volvo"; 
var carname;






JavaScript is _________ language.





Comments in JS are ignored by ____________.





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





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

var num;








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





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

What will be the output of the following code ?





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





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





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





var var1 = "Pritesh";

Above variable can store value of type.





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





JS Comment can be used for following purposes





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





The syntax of Eval is ________________





Why JavaScript is called as Lightweight Programming Language ?





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





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





Comment Statement is _________________ type of statement.





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

Which of the statement will be neglected by Browser ?











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





____________ is used to assign value to the variable.





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





In JavaScript, Window.prompt() method return true or false value ?



Which of the following is not a compound assignment operator.





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





The syntax of capture events method for document object is ______________





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

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






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





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');




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

Value of Z is





A conditional expression is also called a





The “var” and “function” are





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





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





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





JavaScript is interpreted by _________





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





Java Script have following type of Comment(s) -





Variable can hold ________ value at a time





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



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



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





Group of JavaScript Statements is called as _________.





JavaScript was invented at _______ Lab .





What will be printed inside webpage ?

var message="Hello JS";






The output for the following code snippet would most appropriately be

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






Following JS Code Consists of different Type of Statements -

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

What are different Type of statements written inside above JS.






What will be printed on the screen ? Var3 =100101010





Consider the following statements

var count = 0;
while (count < 10) 

In the above code snippet, what happens?





Local Variables are destroyed after execution of function.



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