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

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



Which of the following is not JavaScript Data Types?





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





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





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





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





Which is a more efficient code snippet ?

Code 1 :

for(var num=10;num>=1;num--)

Code 2 :

var num=10;






All modern browsers supports JS.



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





The “var” and “function” are





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





What will be the output of the following script ?

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







var var1 = "Pritesh";

Above variable can store value of type.





Consider the following statements

var count = 0;
while (count < 10) 

In the above code snippet, what happens?





Which best explains getSelection()?





Which of the following is not a comparison operator ?






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





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

var carname="Volvo"; 
var carname;






The syntax of capture events method for document object is ______________





Executable single line of Script is called as _________________.





Variable declared outside JavaScript Function is called as _______________ .



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



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?





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





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



Which was the first browser to support JavaScript ?





JavaScript Code is written inside file having extension __________.





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





var num;

Above Statement is called as __________ Statement.





A conditional expression is also called a





var num=20;

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





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




Local Variables are destroyed after execution of function.



When an empty statement is encountered, a JavaScript interpreter





Choose the client-side JavaScript object?





The statement a===b refers to





The _______ method of an Array object adds and/or removes elements from an array.





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





/* This is Simple Comment */

This is the example of ____________ Comment.



"===" operator is _______________.





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





Which of the following is not a JSON type?





Choose the server-side JavaScript object?





What are variables used for in JavaScript Programs?





Single Line Comment Starts with _________ Symbol.





Java Statement terminated by ______________ ,





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





The generalised syntax for a real number representation is





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





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





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





JavaScript was invented at _______ Lab .





Scripting language are




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





Which company developed JavaScript?





Which of the following is not an logical operator ?





____________ is the tainted property of a window object.





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

Guess output of the following code.










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





Multiple Declarations of variables are separated by ___________ symbol





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

Guess output of the following code.





Which of the following is not considered a JavaScript operator?













Variable declared inside JavaScript Function will be called as ____________.



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





The development environment offers which standard construct for data validation





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

This code will include External JS inside your webpage.



Comment Statement is _________________ type of statement.





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





JavaScript entities start with _______ and end with _________.





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

Guess output of the following code.





JavaScript syntax to change the content of the following HTML code





Conditional Operator shown in the following example is _____________.

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






JavaScript is designed for following purpose 





Integer Variable is declared using following syntax in JavaScript.


Integer num;



var num;



int num;



integer num;


JavaScript is interpreted by _________





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





Which of the following is not a compound assignment operator.





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





Assignment Operators is following type of operator ______________.





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





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

What will be the value of Variable 'output' ?





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






What is the output?




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





Which is the correct way to write a JavaScript array?


var txt = new Array(1:"tim",2:"kim",3:"jim")



var txt = new Array:1=("tim")2=("kim")3=("jim")



var txt = new Array("tim","kim","jim")



var txt = new Array="tim","kim","jim"


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



Which of the following is correct about features of JavaScript?





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

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






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



<script type="text/javascript">
    var name;
    name = "Pritesh";
<script type="text/javascript">

What will be the output of the following ?





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

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






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





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





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





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





Group of JavaScript Statements is called as _________.





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

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






What does the tag do?





Comments in JS are ignored by ____________.





<script language="javascript">
function x()

What is the output?





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