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

Assignment Operators is following type of operator ______________.

  

  

  

  

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

  

  

  

  

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

This code will include External JS inside your webpage.

  

  

The output for the following code snippet would most appropriately be

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

 

  

  

  

  

JavaScript Code can be called by using _________.

  

  

  

  

JavaScript code contain sequence of ___________.

  

  

  

  

<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 Attribute is used to include External JS code inside your HTML Document -

  

  

  

  

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

  

  

  

  

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

  

  

  

  

JavaScript is Case Sensitive !!Say True or False

  

  

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>

 

  

  

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

  

  

  

  

What will be printed on the screen ? Var3 =100101010

  

  

  

  

What will be printed inside webpage ?

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

 

  

  

  

  

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

  

  

  

  

Which of the following is considered as End of Single line comment ?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

JS Comment can be used for following purposes

  

  

  

  

JavaScript syntax to change the content of the following HTML code

  

  

  

  

Which of the following is correct about features of JavaScript?

  

  

  

  

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

What is the output?

  

  

  

JavaScript entities start with _______ and end with _________.

  

  

  

  

var var1 = "Pritesh";

Above variable can store value of type.

  

  

  

  

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

  

  

  

  

The syntax of close method for document object is ______________

  

  

  

  

JavaScript is a _______________ language

  

  

  

  

JavaScript is ideal to

  

  

  

  

"===" operator is _______________.

  

  

  

  

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

var carname="Volvo"; 
var carname;

 

  

  

  

  

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.

  

  

  

  

The escape sequence ‘f’ stands for

  

  

  

  

Consider the following statements

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

In the above code snippet, what happens?

  

  

  

  

All modern browsers supports JS.

  

  

A hexadecimal literal begins with

  

  

  

  

Which of the following is the correct syntax to display “Welcome” in an alert box using JavaScript?

  

  

  

  

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

  

  

  

  

Comments in JS are ignored by ____________.

  

  

  

  

JSON name/value pair is written as

  

  

  

  

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

What will be the value of Variable 'output' ?

  

  

  

  

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

  

  

The statement a===b refers to

  

  

  

  

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?

  

  

  

  

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

  

  

  

  

var num;

Above Statement is called as __________ Statement.

  

  

  

  

JavaScript Code can be called by using _________.

  

  

  

  

What will be the output of the following script ?

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

</html>

 

  

  

  

  

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

  

  

  

  

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

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

 

  

  

  

  

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

  

  

  

  

The syntax of capture events method for document object is ______________

  

  

  

  

Conditional Operator shown in the following example is _____________.

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

 

  

  

  

  

State the correct place of JS Code inside HTML -

  

  

  

  

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

var num;

 

  

  

  

undefined

 

  

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

  

  

  

  

JavaScript is _________ language.

  

  

  

  

JavaScript is interpreted by _________

  

  

  

  

JavaScript is invented by ________.

  

  

  

  

"++" can operate only on ________________.

  

  

  

  

Executable single line of Script is called as _________________.

  

  

  

  

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

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

 

  

  

  

  

Which of the following is not considered a JavaScript operator?

  

new

 

  

this

 

  

delete

 

  

typeof

 

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

  

  

Which of the following is not a compound assignment operator.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following is not an logical operator ?

  

  

  

  

What does the tag do?

  

  

  

  

Multiple Declarations of variables are separated by ___________ symbol

  

  

  

  

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

  

  

  

  

The generalised syntax for a real number representation is

  

  

  

  

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

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

What are variables used for in JavaScript Programs?

  

  

  

  

If the values on either side of '+' operator are numerical values then ___________.

  

  

  

Scripting language are

  

  

  

Which of the following is not JavaScript Data Types?

  

  

  

  

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

  

  

  

  

Choose the server-side JavaScript object?

  

  

  

  

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

  

  

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

  

  

Which was the first browser to support JavaScript ?

  

  

  

  

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

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

 

  

  

How to create a Date object in JavaScript?

  

  

  

  

Which company developed JavaScript?

  

  

  

  

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

  

  

  

  

JSON strings have to be in

  

  

  

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

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

 

  

  

  

  

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

  

  

  

  

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

  

  

  

var num=20;

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

  

  

  

  

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

  

  

  

  

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?

  

  

  

  

The type of a variable that is volatile is

  

  

  

  

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

  

  

  

  

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.