Development - Java Script - Statements 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 contain sequence of ___________.

  

  

  

  

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

  

  

  

  

JS Comment can be used for following purposes

  

  

  

  

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

What is the output.?

  

  

  

  

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

  

  

  

  

When an empty statement is encountered, a JavaScript interpreter

  

  

  

  

Comments in JS are ignored by ____________.

  

  

  

  

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

  

  

  

  

What will be printed on the screen ? Var3 =100101010

  

  

  

  

A conditional expression is also called a

  

  

  

  

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

  

  

  

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

  

  

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

  

  

  

  

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.

  

  

  

  

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

  

  

  

____________ is used to assign value to the variable.

  

  

  

  

What will be printed inside webpage ?

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

 

  

  

  

  

Comment Statement is _________________ type of statement.

  

  

  

  

Java Script have following type of Comment(s) -

  

  

  

  

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

  

  

  

  

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

  

  

  

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

What will be the value of Variable 'output' ?

  

  

  

  

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

  

  

  

  

JavaScript is a _______________ language

  

  

  

  

Java Statement terminated by ______________ ,

  

  

  

  

JavaScript Statements are executed by ________ .

  

  

  

  

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

  

  

  

  

The “var” and “function” are

  

  

  

  

<script>
document.write(navigator.appCodeName);
</script>

What is the output?

  

  

  

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.