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

Correct Answer Choice A < script src="abc.js" >
See Answer

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

Correct Answer Choice A Division by zero
See Answer

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

int a==2; int b=4; int ans=a+b; print(ans);

Correct Answer Choice D error
See Answer

MCQ 4 What is the output of the follwing code .

<script type="text/javascript">
a = 8 + "8";
document.write(a);
</script>

Correct Answer Choice C 88
See Answer


MCQ 5 Which of the following is not a reserved word in JavaScript?

Correct Answer Choice C program
See Answer

MCQ 6 Which of the following are the errors in JavaScript?

Correct Answer Choice B Run time errors
See Answer

MCQ 7 What is the correct JavaScript syntax to write "Welcome to the Universal Portal for Education KNOWLEDGE UNIVERSE ONLINE"?

Correct Answer Choice D document.write("Welcome to the Universal Portal for Education KNOWLEDGE UNIVERSE ONLINE")
See Answer

MCQ 8 Inside which HTML element do we put the JavaScript?

Correct Answer Choice C < js >
See Answer


MCQ 9 Scripting language are

Correct Answer Choice A High Level Programming language
See Answer

MCQ 10 Which of the following event fires when the form element loses the focus: <button>, <input>, <label>, <select>, <textarea>?

Correct Answer Choice C onblur
See Answer

MCQ 11 Which best explains getSelection()?

Correct Answer Choice B Returns the value of cursor-selected text
See Answer

MCQ 12 What is the output of the following code?

<script type="text/javascript">
x=7+"7";
document.write(x);
</script>

Correct Answer Choice D 77
See Answer


MCQ 13 What will be the output?

const pi=3.14;
var pi=4;
console.log(pi);

Correct Answer Choice C This will flash an error
See Answer

MCQ 14 If an operator is NaN or converts to NaN, what wil comparison operator always returns ?

Correct Answer Choice C False
See Answer

MCQ 15 What is the full form DOM?

Correct Answer Choice D Document Object Model
See Answer

MCQ 16 Which of the following is the descendant operator?

Correct Answer Choice B
See Answer


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

Correct Answer Choice B False
See Answer

MCQ 18 What should appear at the very end of your JavaScript? The <script language="javascript"> tag

Correct Answer Choice A < /script >
See Answer

MCQ 19 What will be the output of the below code?

let chaval= (p)=>p+2;
console.log(chaval(2));

Correct Answer Choice A 4
See Answer

MCQ 20 How do we define the term Thread?

Correct Answer Choice C Controlled execution of applications
See Answer


MCQ 21 Which one is a ternary operator in JavaScript?

Correct Answer Choice D ?:
See Answer

MCQ 22 What will be the output of the below code?

class Rect {
constructor(h, w) {
this.height = h;
this.width = w;
}
get foo() {
return this.foo();
}
foo() {
return this.height * this.width;
}
}
const sq = new Rect(5, 20);
console.log(sq.foo());

Correct Answer Choice B 100
See Answer

MCQ 23 What will be printed in the console on execution of the following JS code:

var array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
var myArr= array.filter(v => v % 3 === 0);
console.log(myArr);

Correct Answer Choice C [3, 6, 9, 12, 15]
See Answer

MCQ 24 In JavaScript, a _____________ is an object of the target language data type that encloses an object of the source language.

Correct Answer Choice A wrapper
See Answer


MCQ 25 What are the types of Pop up boxes available in JavaScript?

Correct Answer Choice D All of the above
See Answer

MCQ 26 what will be the output of below code?

var todaysDate = new Date()
console.log( todaysDate.toLocaleString() );

Correct Answer Choice D 2019-5-9 15:02:35
See Answer

MCQ 27 How do you find the minimum of x and y using JavaScript?

Correct Answer Choice A min(x,y);
See Answer

MCQ 28 Choose the server-side JavaScript object?

Correct Answer Choice D File
See Answer


MCQ 29 Consider the below code:
Identify the correct code in order to fetch the value entered in username text field?

<body>
<form name="register">
Enter username <input value="Rajiv" id="name" name="username">
</form>
</body>

Correct Answer Choice D document.getElementById ("name").value
See Answer

MCQ 30 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>

Correct Answer Choice C 2030
See Answer

MCQ 31 What will be the output of the below code ?

var i=true;
var j=false;
var k=true;
if( i || J && K){
a=10;
b="True";
}
else {
a=20;
b="False";
}
console.log(a+","+b);

Correct Answer Choice A 10, true
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