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

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





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





Why so JavaScript and Java have similar name?





Adding String and Integer always results in _________.





JavaScript Code is written inside file having extension __________.





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





Multiple Declarations of variables are separated by ___________ symbol





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





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





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

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




Local Variables are destroyed after execution of function.



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



"===" operator is _______________.





JavaScript is also called as _____________.





State the correct place of JS Code inside HTML -





The script tag must be placed in





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

var num;








Is it possible to nest functions in JavaScript?



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





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





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





Which best explains getSelection()?





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





var num=20;

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





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





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





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





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

This code will include External JS inside your webpage.



JavaScript entities start with _______ and end with _________.





Variable can hold ________ value at a time





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





How to create a Date object in JavaScript?





var var1 = "Pritesh";

Above variable can store value of type.





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





Which of the following attribute can hold the JavaScript version?





Single Line Comment Starts with _________ Symbol.





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





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





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

What is the output?





Integer Variable + Character Variable + Undefined Variable = ______________ Value





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





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

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





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





JavaScript is Case Sensitive !!Say True or False



Which is a more efficient code snippet ?

Code 1 :

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

Code 2 :

var num=10;






Java Script have following type of Comment(s) -





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




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





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





<script type="text/javascript">
// document.write("<h1>Heading</h1>");

Which of the statement will be neglected by Browser ?











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?





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





Microsoft Developed a compatible dialect of JavaScript called _____________.





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





JavaScript is _________ language.





What will be the output of the following script ?

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







The syntax of capture events method for document object is ______________





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





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





/* This is Simple Comment */

This is the example of ____________ Comment.



JavaScript Code can be called by using _________.





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

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






To automatically open the console when a JavaScript error occurs which of the following is added to prefs.js?





The syntax of close method for document object is ______________





____________ is used to assign value to the variable.





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



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





The statement a===b refers to





Which of the following is not an logical operator ?





What does the tag do?





JavaScript is designed for following purpose 





What are variables used for in JavaScript Programs?





Group of JavaScript Statements is called as _________.





Choose the server-side JavaScript object?





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




Java Script Variable should be Case ___________.



Vriables declared inside function are visible _______________.





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





Comment Statement is _________________ type of statement.





The escape sequence ‘f’ stands for





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



JS Comment can be used for following purposes





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





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

<script type="text/javascript">




The “var” and “function” are





"++" can operate only on ________________.





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





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





All modern browsers supports JS.



A conditional expression is also called a





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





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



The type of a variable that is volatile is





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





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





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

What will be the output of the following ?





JavaScript was invented at _______ Lab .





Java Statement terminated by ______________ ,





Which of the following is not a compound assignment operator.





Which of the following function of String object causes a string to be italic, as if it were in an tag?





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