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

Choose the server-side JavaScript object?

  

  

  

  

JavaScript is interpreted by _________

  

  

  

  

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

var num;

 

  

  

  

undefined

 

  

Which of the following is not considered a JavaScript operator?

  

new

 

  

this

 

  

delete

 

  

typeof

 

The syntax of capture events method for document object is ______________

  

  

  

  

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

var carname="Volvo"; 
var carname;

 

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which types of image maps can be used with JavaScript?

  

  

  

  

What are variables used for in JavaScript Programs?

  

  

  

  

"++" is __________ type of operator.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

JavaScript Statements are executed by ________ .

  

  

  

  

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

  

  

  

  

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

  

  

  

  

____________ is the tainted property of a window object.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

JavaScript code contain sequence of ___________.

  

  

  

  

var num=20;

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Java Script Variable should be Case ___________.

  

  

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

  

  

  

  

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

  

  

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

  

  

  

  

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

  

  

Is it possible to nest functions in JavaScript?

  

  

Which of the following is not JavaScript Data Types?

  

  

  

  

JavaScript is _________ language.

  

  

  

  

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

  

  

  

  

Group of JavaScript Statements is called as _________.

  

  

  

  

Which company developed JavaScript?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

What is the output?

  

  

  

JavaScript entities start with _______ and end with _________.

  

  

  

  

JavaScript is ______ Side Scripting Language.

  

  

  

  

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

  

  

  

  

"++" can operate only on ________________.

  

  

  

  

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

  

  

  

  

JavaScript is also called as _____________.

  

  

  

  

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

What is the output.?

  

  

  

  

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

  

  

  

  

JavaScript is Case Sensitive !!Say True or False

  

  

Adding String and Integer always results in _________.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

The escape sequence ‘f’ stands for

  

  

  

  

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

  

  

  

  

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

What will be the value of Variable 'output' ?

  

  

  

  

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

  

  

  

  

The syntax of Eval is ________________

  

  

  

  

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

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

 

  

  

  

  

Local Variables are Destroyed as soon as ______________.

  

  

  

  

JavaScript syntax to change the content of the following HTML code

  

  

  

  

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

  

  

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

  

  

  

  

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

  

  

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

  

  

  

  

One of the special features of an interpreter in reference with the for loop is that ___________

  

  

  

  

A statement block is a

  

  

  

  

A hexadecimal literal begins with

  

  

  

  

Conditional Operator shown in the following example is _____________.

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

 

  

  

  

  

JavaScript is ideal to

  

  

  

  

Which of the following is correct about features of JavaScript?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following attribute can hold the JavaScript version?

  

  

  

  

Assignment Operators is following type of operator ______________.

  

  

  

  

Choose the client-side JavaScript object?

  

  

  

  

A conditional expression is also called a

  

  

  

  

JavaScript was invented at _______ Lab .

  

  

  

  

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

  

  

  

  

Variable declared inside JavaScript Function will be called as ____________.

  

  

Variable declared outside JavaScript Function is called as _______________ .

  

  

Scripting language are

  

  

  

Local Variables are destroyed after execution of function.

  

  

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

  

  

  

  

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 the correct syntax to display “Welcome” in an alert box using JavaScript?

  

  

  

  

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

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

 

  

  

JavaScript was originally developed under the name _______.

  

  

  

  

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

What will be the output of the following code ?

  

  

  

  

Java Statement terminated by ______________ ,

  

  

  

  

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

  

  

  

Java Script have following type of Comment(s) -

  

  

  

  

The statement a===b refers to

  

  

  

  

JavaScript is designed for following purpose 

  

  

  

  

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

  

  

Consider the following statements

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

In the above code snippet, what happens?

  

  

  

  

Spaces,Punctuation marks are called as __________ Symbols in JavaScript.

  

  

  

  

All modern browsers supports JS.

  

  

<script language="javascript">
function x()
{
document.write(2+5+"8");
}
</script> 

What is the output?

  

  

  

  

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

  

  

  

  

JavaScript is a _______________ language

  

  

  

  

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

  

  

  

  

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.