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

Which of the following is correct about features of JavaScript?

  

  

  

  

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

  

  

  

  

Conditional Operator shown in the following example is _____________.

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

 

  

  

  

  

Adding String and Integer always results in _________.

  

  

  

  

All modern browsers supports JS.

  

  

JavaScript is Case Sensitive !!Say True or False

  

  

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.

  

  

  

  

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

  

  

  

  

Which of the following is not a compound assignment operator.

  

  

  

  

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

  

  

  

  

The “var” and “function” are

  

  

  

  

Variable declared outside JavaScript Function is called as _______________ .

  

  

Why so JavaScript and Java have similar name?

  

  

  

  

JavaScript is invented by ________.

  

  

  

  

The syntax of capture events method for document object is ______________

  

  

  

  

Variable can hold ________ value at a time

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

Guess output of the following code.

  

  

  

  

The syntax of Eval is ________________

  

  

  

  

Which was the first browser to support JavaScript ?

  

  

  

  

Is it possible to nest functions in JavaScript?

  

  

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

  

  

  

  

The escape sequence ‘f’ stands for

  

  

  

  

Which company developed JavaScript?

  

  

  

  

JavaScript is ______ Side Scripting Language.

  

  

  

  

____________ is used to assign value to the variable.

  

  

  

  

var num;

Above Statement is called as __________ Statement.

  

  

  

  

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

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

 

  

  

  

  

JS Comment can be used for following purposes

  

  

  

  

<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 is mean by "this" keyword in javascript?

  

  

  

  

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

  

  

  

  

"++" can operate only on ________________.

  

  

  

  

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

This code will include External JS inside your webpage.

  

  

JavaScript is also called as _____________.

  

  

  

  

Which is a more efficient code snippet ?

Code 1 :

for(var num=10;num>=1;num--)
{
           document.writeln(num);
}

Code 2 :

var num=10;
while(num>=1)
{
       document.writeln(num);
       num++;
}

 

  

  

  

  

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

  

  

  

  

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?

  

  

  

  

Single Line Comment Starts with _________ Symbol.

  

  

  

  

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

  

  

  

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

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

 

  

  

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

  

  

Local Variables are destroyed after execution of function.

  

  

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

  

  

  

  

JavaScript Code is written inside file having extension __________.

  

  

  

  

Variable declared inside JavaScript Function will be called as ____________.

  

  

The output for the following code snippet would most appropriately be

var a=5 , b=1
var obj = { a : 10 }
with(obj) 
{
      alert(b)
}

 

  

  

  

  

Local Variables are Destroyed as soon as ______________.

  

  

  

  

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

  

  

  

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

Guess output of the following code.

  

5
6
11



  

5
6
56

 

  

5
6
10

 

  

JavaScript is _________ language.

  

  

  

  

JavaScript is a _______________ language

  

  

  

  

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

  

  

  

  

JavaScript is ideal to

  

  

  

  

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

  

  

  

  

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

  

  

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

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

 

  

  

  

  

Integer Variable is declared using following syntax in JavaScript.

  

Integer num;

 

  

var num;

 

  

int num;

 

  

integer num;

 

Java Script have following type of Comment(s) -

  

  

  

  

The syntax of close method for document object is ______________

  

  

  

  

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

  

  

  

  

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

  

  

  

"++" is __________ type of operator.

  

  

  

  

function message() {
    var name = "Pritesh";
    alert(name);
}

Variable declared above is example of ___________ Variable.

  

  

Choose the client-side JavaScript object?

  

  

  

  

Choose the server-side JavaScript object?

  

  

  

  

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

  

  

  

  

JavaScript code contain sequence of ___________.

  

  

  

  

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

  

  

  

  

/* This is Simple Comment */

This is the example of ____________ Comment.

  

  

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

  

  

Why JavaScript is called as Lightweight Programming Language ?

  

  

  

  

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

What is the output?

  

  

  

A conditional expression is also called a

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

What does the tag do?

  

  

  

  

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

What is the output.?

  

  

  

  

How to create a Date object in JavaScript?

  

  

  

  

JavaScript Code can be called by using _________.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Java Statement terminated by ______________ ,

  

  

  

  

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

  

  

  

  

The generalised syntax for a real number representation is

  

  

  

  

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

  

  

  

  

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?

  

  

  

  

Microsoft Developed a compatible dialect of JavaScript called _____________.

  

  

  

  

JavaScript entities start with _______ and end with _________.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Comment Statement is _________________ type of statement.

  

  

  

  

Underscore can be used as first letter while declaring variable in JavaScript.

  

  

When an empty statement is encountered, a JavaScript interpreter

  

  

  

  

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

  

  

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

  

  

  

  

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.