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 was invented at _______ Lab .

  

  

  

  

Which was the first browser to support JavaScript ?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which types of image maps can be used with JavaScript?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

All modern browsers supports JS.

  

  

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

  

  

  

  

JavaScript is also called as _____________.

  

  

  

  

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

  

  

  

  

Why so JavaScript and Java have similar name?

  

  

  

  

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

  

  

Assignment Operators is following type of operator ______________.

  

  

  

  

<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>");
}
</script>

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

  

  

Microsoft Developed a compatible dialect of JavaScript called _____________.

  

  

  

  

var var1 = "Pritesh";

Above variable can store value of type.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

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

 

  

  

"===" operator is _______________.

  

  

  

  

When an empty statement is encountered, a JavaScript interpreter

  

  

  

  

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?

  

  

  

  

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>");
    }
</script>

What are different Type of statements written inside above JS.

  

  

  

  

  

Which of the following is not a compound assignment operator.

  

  

  

  

What will be printed inside webpage ?

var message="Hello JS";
document.write(Message);

 

  

  

  

  

Consider the following statements

var count = 0;
while (count < 10) 
{
     console.log(count);
     count++;
}

In the above code snippet, what happens?

  

  

  

  

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

  

  

  

  

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

<script type="text/javascript">
...
</script>

 

  

  

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

  

  

  

JavaScript code contain sequence of ___________.

  

  

  

  

Multiple Declarations of variables are separated by ___________ symbol

  

  

  

  

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

  

  

/* This is Simple Comment */

This is the example of ____________ Comment.

  

  

What are variables used for in JavaScript Programs?

  

  

  

  

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?

  

  

  

  

Java Script Variable should be Case ___________.

  

  

The type of a variable that is volatile is

  

  

  

  

The statement a===b refers to

  

  

  

  

Variable declared outside JavaScript Function is called as _______________ .

  

  

What will be printed on the screen ? Var3 =100101010

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

Which of the statement will be neglected by Browser ?

  

<p>Google</p>

 

  

<p>Yahoo</p>

 

  

<h1>Heading</h1>

 

  

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

  

  

  

  

Which of the following is not an logical operator ?

  

  

  

  

Java Statement terminated by ______________ ,

  

  

  

  

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

  

  

  

  

____________ is used to assign value to the variable.

  

  

  

  

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

  

  

  

  

<html>
<body>
<script type="text/javascript">
<!--
document.print("Hello");
//-->
</script>
</body>
</html>

What will be the Output of the above Code ?

  

  

  

  

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

Value of Z is

  

  

  

  

Which of the following attribute can hold the JavaScript version?

  

  

  

  

The syntax of capture events method for document object is ______________

  

  

  

  

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

  

  

  

  

JavaScript is Case Sensitive !!Say True or False

  

  

<html>
    <head>
        <title>A Simple Page</title>
        <script language="JavaScript">
            <!--
            var A = "Compile ",
                B = "Error";
            C = A + B;
            alert(C);
            //  -->
        </script>
    </head>
    <body></body>
</html>

What will be printed ?

  

  

  

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

  

  

  

  

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

var carname="Volvo"; 
var carname;

 

  

  

  

  

State the correct place of JS Code inside HTML -

  

  

  

  

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

Guess output of the following code.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which best explains getSelection()?

  

  

  

  

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

  

  

  

  

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

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

  

  

  

  

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

  

  

  

  

A ________ object is a reference to one of the classes in a Java package, such as netscape.javascript .

  

  

  

  

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

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

 

  

  

  

  

Vriables declared inside function are visible _______________.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Java Script have following type of Comment(s) -

  

  

  

  

Choose the server-side JavaScript object?

  

  

  

  

Scripting language are

  

  

  

Is it possible to nest functions in JavaScript?

  

  

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

var num;

 

  

  

  

undefined

 

  

<script type="text/javascript">
    var name;
    name = "Pritesh";
</script>
<script type="text/javascript">
    document.write(name);
</script>

What will be the output of the following ?

  

  

  

  

Which of the following is not a comparison operator ?

  

  

  

  

  

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

  

  

  

  

var num=20;

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

  

  

  

  

var num;

Above Statement is called as __________ Statement.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

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

 

  

  

  

  

"++" is __________ type of operator.

  

  

  

  

____________ is the tainted property of a window object.

  

  

  

  

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

  

  

  

  

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

  

  

Which of the following is not considered a JavaScript operator?

  

new

 

  

this

 

  

delete

 

  

typeof

 

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

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

  

  

  

  

<script type="text/javascript">
x=4+"4";
document.write(x);
</script> 

What is the output.?

  

  

  

  

What is mean by "this" keyword in javascript?

  

  

  

  

Adding String and Integer always results in _________.

  

  

  

  

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

What is the output?

  

  

  

  

A hexadecimal literal begins with

  

  

  

  

The escape sequence ‘f’ stands for

  

  

  

  

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

  

  

  

  

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