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 not considered a JavaScript operator?













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





Single Line Comment Starts with _________ Symbol.





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





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





How to create a Date object in JavaScript?





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





Which of the following is not a comparison operator ?






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

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






<script type="text/javascript">

What will be the Output of the above Code ?





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



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



Which of the following Attribute is used to include External JS code inside your HTML Document -





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




Consider the following statements

var count = 0;
while (count < 10) 

In the above code snippet, what happens?





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





"++" can operate only on ________________.





var num=20;

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





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



How does JavaScript store dates in a date object? 





JavaScript is a _______________ language





"===" operator is _______________.





What will be the output of the following script ?

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







What will be printed on the screen ? Var3 =100101010





Java Script have following type of Comment(s) -





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





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





What does the tag do?





Choose the server-side JavaScript object?





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





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

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






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




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

var carname="Volvo"; 
var carname;






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

What will be the output of the following ?





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

What is the output?





Java Script Variable should be Case ___________.



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





What will be printed inside webpage ?

var message="Hello JS";






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





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





The output for the following code snippet would most appropriately be

var a=5 , b=1
var obj = { a : 10 }






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



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





To enable data tainting, the end user sets the _________ environment variable.





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



JavaScript code contain sequence of ___________.





JavaScript is ______ Side Scripting Language.





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?





JavaScript is invented by ________.





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





Comment Statement is _________________ type of statement.





Vriables declared inside function are visible _______________.





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

<script type="text/javascript">




Comments in JS are ignored by ____________.





JavaScript Code can be called by using _________.





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





Conditional Operator shown in the following example is _____________.

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






Integer Variable + Character Variable + Undefined Variable = ______________ Value





Multiple Declarations of variables are separated by ___________ symbol





Which best explains getSelection()?





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





Which types of image maps can be used with JavaScript?





var var1 = "Pritesh";

Above variable can store value of type.





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




When an empty statement is encountered, a JavaScript interpreter





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

var num;








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





The statement a===b refers to





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





The type of a variable that is volatile is





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





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





Choose the client-side JavaScript object?





Adding String and Integer always results in _________.





<script type="text/javascript">
        document.Write("<h1>This is a heading</h1>");

Above Code contain one executive Statement. Guess the Output of the Above Code.





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





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





            var name = "John Doe";
            var name = 123;
            document.write(name + "<br>");

Is it possible to change the type of value after re-assignment.





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





The script tag must be placed in





All modern browsers supports JS.



Which of the following attribute can hold the JavaScript version?





Initialization of variable can be done by writing _____ operator in between variable name and operand value.





JavaScript was invented at _______ Lab .





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"


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





JavaScript was originally developed under the name _______.





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





State the correct place of JS Code inside HTML -





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?





Variable can hold ________ value at a time





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





The development environment offers which standard construct for data validation





Which of the following is not an logical operator ?





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





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





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





What will be the output of the following script ?

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






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




The “var” and “function” are





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