Javascript Programming Quiz


Play this Javascript quiz that will help you to excel in Javascript certification exams, placements etc. This Javascript programming quiz consist of 10 questions that you need to solve in 10 minutes. We’ve specially designed this quiz so that you can quickly acquaint to the pattern of questions you can be asked in placement drives, certification exams etc. This Javascript programming test enables you to assess your knowledge of Javascript programming.

Take the Free Practice Test



Javascript MCQs

Practice Javascript MCQ Questions, which will help you to clear your JS related concepts and also helps you to prepare for placements, technical rounds, interviews, competitive exams etc.

Javascript Quiz

Try Free Javascript Quiz, to start a quiz you need to login first, after login you will get start quiz button and then by clicking on that you can start quiz. You will get 10 Minutes to answer all questions.

Javascript Quiz

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

< p id="demo">< /p>
< script>
var a = 20;
var b = "30";
var c = a + b;
document.getElementById ("demo").innerHTML = c;
< /script>

50
20+30
2030
error

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

True
False
undefined
error

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

"New Text"?
para1.value="New Text";
para1.firstChild.nodeValue= "New Text";
para1.nodeValue="New Text";

4. What is the code required to delete all “weight” tags?

delete weight(pt).all;
delete pt.element[all];
delete pt;
delete pt..weight;

5. The inner frame within a top-level window can be referred to as _____________

parent(parent)
parent.parent
parent*parent
parent/parent

6. which operator evaluates its operands, then discards the value and returns undefined?

In
Comparison
Eval
Void

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

function myfun()
{
var a = null;
document.getElementById ("demo").innerHTML = Boolean(a);
} }

true
false
error
undefined

8. Which of the following is the descendant operator?

..
...
*
@

9. What will be the output of the following JavaScript code?

function myfun()
{
var a = "";
document.getElementById ("demo").innerHTML = Boolean(a);
}

true
false
error
undefined

10. How are windows, tabs, iframes, and frames treated according to client-side javascript?

They are all browsing contexts
They are all browsing information
They are all Window contexts
They are all Window objects

Results