MCQ 1 What will be the output of the following JavaScript code?

var myvar = Boolean('false');
document.getElementById ("demo").innerHTML = myvar;

Correct Answer Choice C true
See Answer

MCQ 2 Variable declared is example of ________________ Variable.

function message() {
var varname = "Rajiv";
alert(name);
}

Correct Answer Choice A Local
See Answer

MCQ 3 What is the output of the following code?

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

Correct Answer Choice C 78
See Answer

MCQ 4 Which tag(s) can handle mouse events in Netscape?

Correct Answer Choice D < img > tag
See Answer


MCQ 5 What if you use parseInt() to convert a string containing decimal value?

Correct Answer Choice C It returns the decimal values in string form
See Answer

MCQ 6 Javascript Addition : Addition is

document.write("1 plus 1 is " + 1 + 1);

Correct Answer Choice B 1 plus 1 is 11
See Answer

MCQ 7 What will be the output of the following JavaScript code?

num1=5;
function cal() {
num1=10;
num2=5;
num3=num2*num1;
console.log(num3);
}
cal();

Correct Answer Choice B 50
See Answer

MCQ 8 Which of the following method checks if its argument is not a number?

Correct Answer Choice A isNaN()
See Answer


MCQ 9 Which is the correct way to write a JavaScript array?

Correct Answer Choice C var website = new Array("Online", "Education", "knowledgeuniverseonline.com")
See Answer

MCQ 10 State whether the following statements are True or False for strict equality operator(= = =).

  • If the two values have different types they are equal.
  • If both values are null or both values are undefined, they are equal.
  • <

    Correct Answer Choice A False True
    See Answer

MCQ 11 Which of the following attribute can hold the JavaScript version?

Correct Answer Choice A language
See Answer

MCQ 12 Which of the following is not a valid JavaScript variable name?

Correct Answer Choice A 2varaiblename
See Answer


MCQ 13 JavaScript is interpreted by _________

Correct Answer Choice A Client
See Answer

MCQ 14 If the operator value is null, then the unary operator returns the type of _____________

Correct Answer Choice C object
See Answer

MCQ 15 Which operator is known as the strict equality operator, which checks whether its two operators are identical or not?

Correct Answer Choice C &&
See Answer

MCQ 16 JavaScript can be written __________

Correct Answer Choice A directly into JS file and included into HTML
See Answer


MCQ 17 what is the disadvantage of using innerHTML in JavaScript?

Correct Answer Choice B Even if you use +=like "innerHTML = innerHTML + 'html'" still the old content is replaced by html
See Answer

MCQ 18 Which operator is known as the equality operator, which checks whether its two operators are "equal"?

Correct Answer Choice B ==
See Answer

MCQ 19 What is the default value of the asyc attribute?

Correct Answer Choice A True
See Answer

MCQ 20 What will be the output if we compare "ten" and 10 with less then comparison operator( "ten" <10)?

Correct Answer Choice B False
See Answer


MCQ 21 When a class B can extend another class A, we say that:

Correct Answer Choice D A is the superclass and B is the subclass
See Answer

MCQ 22 Which of the following is not considered a JavaScript operator?

Correct Answer Choice B this
See Answer

MCQ 23 Which operator will return false if two value are equal?

Correct Answer Choice B !=
See Answer

MCQ 24 If var A = {B : 3, C : 5}, how to use the delete operator to delete one of the properties of an object.

Correct Answer Choice C delete A.B
See Answer


MCQ 25 What is the purpose of script loading?

Correct Answer Choice A Load JavaScript files programmatically
See Answer

MCQ 26 What if we put ++ operator inside if condition? find the output
<script>
var a = 10;
if(a == a++)
document.write(a);
</script>

Correct Answer Choice D 11
See Answer

MCQ 27 What is mean by "this" keyword in javascript?

Correct Answer Choice B It refers current object
See Answer

MCQ 28 What does the following JavaScript data.sort(function(a, b), b- a) do?

Correct Answer Choice D Sort in the alphabetical order
See Answer


MCQ 29 Which symbol is used for comments in Javascript?

Correct Answer Choice B //
See Answer

MCQ 30 What is defination of an undefined value in JavaScript?

Correct Answer Choice D All of the above
See Answer

NTSE, NEET, AIEEE, Olympiad & Other Competive Exams Preparation

Publish Your Article / Write for Us

Article Writing Guide/Help

Trending Questions


Advantages Of NCERT, CBSE & State Boards Solutions For All Subjects

  • All the NCERT Solutions have been prepared by academic experts having 10+ years of teaching experience.
  • They have prepared all the solutions in simple and easy language, so that each and every student can understand the concepts easily.
  • All the solutions have been explained step to step wise in details with better explainations.
  • Students can also use these question and answers for your assignments and in homework help.
  • All the solutions have been explained in detail and the answers have been compiled in a step-wise manner.
  • All the question and asnwers are commonly prepared according to the Latest Syllabus of Board Education and Guidelines.
  • Students can know about the various types of questions asked in the exams with the help of these solutions.

Top Course Categories