Menu mobile
Home
Programming
Python Tutorial
Java Tutorial
C Tutorial
C++ Tutorial
Web Technology
HTML
CSS
Java Script
PHP
React JS
Node JS
Assignment
MS Office
HTML
CSS
Bootstrap
Java Script
JQuery
AngularJs
Project
Blog
QUIZ ON : javascript - JS INTRODUCTION
JS INTRODUCTION
00:00:00
English
Hindi
Question No# :
01
out of 50
What is the output of the following code let a = 10; let b = "10"; console.log(a == b);
निम्नलिखित कोड का परिणाम क्या है let a = 10; let b = "10"; console.log(a == b);
A.
true
सत्य
B.
false
असत्य
C.
undefined
अपरिभाषित
D.
Error
गलत
Question No# :
02
out of 50
Which method is used to display a dialog box that asks for user input
उपयोगकर्ता से इनपुट मांगने वाले डायलॉग बॉक्स को प्रदर्शित करने के लिए किस विधि का उपयोग किया जाता है
A.
alert()
alert
B.
confirm()
confirm()
C.
prompt()
prompt()
D.
console.log()
console.log()
Question No# :
03
out of 50
Which of the following is the correct way to declare a variable in JavaScript
निम्नलिखित में से कौन सा जावास्क्रिप्ट में एक वेरिएबल घोषित करने का सही तरीका है
A.
let myVar;
let myVar;
B.
var myVar;
var myVar;
C.
const myVar;
const myVar;
D.
All of the above
All of the above
Question No# :
04
out of 50
Which of the following keywords is used to declare a function in JavaScriptWhich of the following keywords is used to declare a function in JavaScript
जावास्क्रिप्ट में किसी फ़ंक्शन को घोषित करने के लिए निम्नलिखित में से किस कीवर्ड का उपयोग किया जाता है
A.
function
function
B.
def
def
C.
declare
declare
D.
func
func
Question No# :
05
out of 50
Which is Client Side Script Language
कौन से क्लाइंट साइड स्क्रिप्ट लैंग्वेज है
A.
CSS
CSS
B.
Python
Python
C.
HTML
HTML
D.
JavaScript
JavaScript
Question No# :
06
out of 50
Which operator is used to concatenate strings in JavaScript
जावास्क्रिप्ट में स्ट्रिंग्स को जोड़ने के लिए किस ऑपरेटर का उपयोग किया जाता है
A.
+
+
B.
.
.
C.
*
*
D.
&
&
Question No# :
07
out of 50
JavaScript is designed for following purpose
JavaScript is designed for following purpose
A.
To Perform Server Side Scripting Opertion
To Perform Server Side Scripting Opertion
B.
To Execute Query Related to DB on Server
To Execute Query Related to DB on Server
C.
To add interactivity to HTML Pages
To add interactivity to HTML Pages
D.
To Style HTML Pages
To Style HTML Pages
Question No# :
08
out of 50
What is the output of the following code let i = 2, j = 3; let result = i++ + ++j; console.log(result); .
निम्नलिखित कोड का परिणाम क्या हैlet i = 2, j = 3; let result = i++ + ++j; console.log(result);
A.
5
5
B.
6
6
C.
7
7
D.
Error in Code
कोड में त्रुटि
Question No# :
09
out of 50
What does NaN mean in JavaScript
जावास्क्रिप्ट में NaN का क्या अर्थ है
A.
Not a Name
नाम नहीं
B.
Not a Number
कोई संख्या नहीं
C.
Null and None
शून्य और कोई नहीं
D.
Name and Number
नाम और संख्या
Question No# :
10
out of 50
How can you convert a string to an integer in JavaScript
आप जावास्क्रिप्ट में एक स्ट्रिंग को पूर्णांक में कैसे परिवर्तित कर सकते हैं
A.
int("123")
पूर्णांक('123')
B.
parseInt("123")
पार्सइंट('123')
C.
toInt("123")
toInt('123')
D.
(int) “123”
(int) “123”
Question No# :
11
out of 50
What happens if the condition in a for loop is omitted
यदि लूप में शर्त छोड़ दी जाए तो क्या होगा
A.
The loop runs infinitely
लूप अनंत रूप से चलता है
B.
The loop does not execute
लूप निष्पादित नहीं होता
C.
The loop throws an error
लूप एक त्रुटि देता है
D.
The loop executes once
लूप एक बार निष्पादित होता है
Question No# :
12
out of 50
What is the correct syntax for a for loop in JavaScript
जावास्क्रिप्ट में फॉर लूप के लिए सही सिंटैक्स क्या है
A.
for (initialization, condition, increment/decrement)
(प्रारंभिकरण, स्थिति, वृद्धि/कमी) के लिए
B.
for {initialization; condition; increment/decrement}
{आरंभीकरण के लिए; स्थिति; वृद्धि/कमी}
C.
for (initialization; condition; increment/decrement)
के लिए (प्रारंभिकरण; स्थिति; वेतन वृद्धि/कमी)
D.
for loop (initialization; condition; increment/decrement)
लूप के लिए (प्रारंभिकरण; स्थिति; वृद्धि/कमी)
Question No# :
13
out of 50
Which of the following keywords is used to create an alternative block in an if statement
निम्नलिखित में से किस कीवर्ड का उपयोग if स्टेटमेंट में वैकल्पिक ब्लॉक बनाने के लिए किया जाता है
A.
then
then
B.
else
else
C.
elif
elif
D.
otherwise
otherwise
Question No# :
14
out of 50
What does the confirm() function return if the user clicks "OK"
यदि उपयोगकर्ता "ओके" पर क्लिक करता है तो पुष्टि() फ़ंक्शन क्या लौटाता है
A.
true
सत्य
B.
false
असत्य
C.
yes
हाँ
D.
ok
ठीक है
Question No# :
15
out of 50
Which of the following is a correct JavaScript syntax to write "Hello World" on a webpage
वेबपेज पर "हैलो वर्ल्ड" लिखने के लिए निम्नलिखित में से कौन सा सही जावास्क्रिप्ट सिंटैक्स है
A.
System.out.println("Hello World");
System.out.println('हैलो वर्ल्ड');
B.
document.write("Hello World");
डाक्यूमेंट लिखें('हैलो वर्ल्ड');
C.
echo("Hello World");
इको('हैलो वर्ल्ड');
D.
print("Hello World");
प्रिंट करें ("हैलो वर्ल्ड");
Question No# :
16
out of 50
What is the output of console.log(5 % 2);
कंसोल.लॉग(5% 2); का आउटपुट क्या है
A.
2.5
2.5
B.
2
2
C.
1
1
D.
5
5
Question No# :
17
out of 50
What does console.log() do
कंसोल.लॉग() क्या करता है
A.
Displays a message box with the text inside
अंदर पाठ के साथ एक संदेश बॉक्स प्रदर्शित करता है
B.
Prints output to the web browser
वेब ब्राउज़र पर आउटपुट प्रिंट करता है
C.
Prints output to the browser's console
ब्राउज़र के कंसोल पर आउटपुट प्रिंट करता है
D.
Terminates the script
स्क्रिप्ट को समाप्त करता है
Question No# :
18
out of 50
Which is the correct syntax to call an external JavaScript file in the current HTML document ?
वर्तमान HTML दस्तावेज़ में बाहरी जावास्क्रिप्ट फ़ाइल को कॉल करने के लिए सही सिंटैक्स कौन सा है?
A.
<script src=" test.js"'></script>
<script src=" test.js"'></script>
B.
<script href=" test.js"></script>
<script href=" test.js"></script>
C.
<import src=" test.js"></import>
<import src=" test.js"></import>
D.
<script link=" test.js"></script>
<script link=" test.js"></script>
Question No# :
19
out of 50
Which operator is used to assign a value to a variable
किसी वेरिएबल को मान निर्दिष्ट करने के लिए किस ऑपरेटर का उपयोग किया जाता है
A.
=
=
B.
==
==
C.
===
===
D.
.!=
!=
Question No# :
20
out of 50
Which of the following is the correct way to write "Hello World" in an alert box
निम्नलिखित में से अलर्ट बॉक्स में "हैलो वर्ल्ड" लिखने का सही तरीका कौन सा है
A.
msg("Hello World");
संदेश ("हैलो वर्ल्ड");
B.
alert("Hello World");
अलर्ट ('हैलो वर्ल्ड');
C.
console.log("Hello World");
कंसोल.लॉग ("हैलो वर्ल्ड");
D.
print("Hello World");
प्रिंट करें ("हैलो वर्ल्ड");
Question No# :
21
out of 50
The extension of JavaScript file is
जावास्क्रिप्ट फाईल का एक्सटेंसन है।
A.
.html
.html
B.
.java
.java
C.
.js
.js
D.
.css
.css
Question No# :
22
out of 50
What does the typeof operator do in JavaScript
जावास्क्रिप्ट में टाइपऑफ़ ऑपरेटर क्या करता है
A.
Checks the type of a variable or expression
किसी वेरिएबल या अभिव्यक्ति के प्रकार की जाँच करता है
B.
Converts data to a specific type
डेटा को एक विशिष्ट प्रकार में परिवर्तित करता है
C.
Creates a new variable type
एक नया वैरिएबल प्रकार बनाता है
D.
Compares data types
डेटा प्रकारों की तुलना करता है
Question No# :
23
out of 50
What is the difference between ++i and i++
++i और i++ में क्या अंतर है
A.
++i increments the value after usage, while i++ increments it before
++i उपयोग के बाद मूल्य बढ़ाता है, जबकि i++ पहले इसे बढ़ाता है
B.
++i increments the value before usage, while i++ increments it after
++i उपयोग से पहले मूल्य बढ़ाता है, जबकि i++ बाद में इसे बढ़ाता है
C.
Both are the same
दोनों एक जैसे हैं
D.
i++ is a syntax error.
i++ एक सिंटैक्स त्रुटि है
Question No# :
24
out of 50
How can you skip the current iteration of a loop
आप किसी लूप की वर्तमान पुनरावृत्ति को कैसे छोड़ सकते हैं
A.
Use break;
ब्रेक का प्रयोग करें;
B.
Use continue;
उपयोग जारी रखें;
C.
Use skip;
स्किप का प्रयोग करें;
D.
Use return;
वापसी का उपयोग करें;
Question No# :
25
out of 50
What is the correct syntax for referring to an external script called "data.js"?
What is the correct syntax for referring to an external script called "data.js"?
A.
<script name="data.js">
<script name="data.js">
B.
<script href="data.js">
<script href="data.js">
C.
<script src="data.js">
<script src="data.js">
D.
<link href="data.js">
<link href="data.js">
Question No# :
26
out of 50
Which of the following is not considered as an error in JavaScript?
निम्नलिखित में से किसे जावास्क्रिप्ट में त्रुटि नहीं माना जाता है?
A.
Syntax error
Syntax error
B.
Accessing a variable or function that is not defined
Accessing a variable or function that is not defined
C.
Division by zero
Division by zero
D.
None of these
None of these
Question No# :
27
out of 50
How can you change the style of an HTML element in JavaScript
आप जावास्क्रिप्ट में HTML तत्व की शैली कैसे बदल सकते हैं
A.
element.css.style = "value";
element.css.style = "मूल्य";
B.
element.style.property = "value";
element.style.property = "value";
C.
element.setStyle("property", "value");
element.setStyle("property", "value");
D.
element.changeStyle.property = "value";
element.changeStyle.property = "value";
Question No# :
28
out of 50
What is the alternate name for Java script?
What is the alternate name for Java script?
A.
LimeScript
LimeScript
B.
ECMScript
ECMScript
C.
Coffee Script
Coffee Script
D.
ECMAScript
ECMAScript
Question No# :
29
out of 50
Which method is used to access an element by its id in JavaScript
जावास्क्रिप्ट में किसी तत्व को उसकी आईडी द्वारा एक्सेस करने के लिए किस विधि का उपयोग किया जाता है
A.
document.getElementById()
document.getElementById()
B.
document.getElementByClass()
document.getElementByClass()
C.
document.querySelector()
document.querySelector()
D.
document.getElementByName()
document.getElementByName()
Question No# :
30
out of 50
What is the output of the following code let result = 10 / 2 * 3; console.log(result);
निम्नलिखित कोड का परिणाम क्या है let result = 10 / 2 * 3; console.log(result);
A.
15
15
B.
1.5
1.5
C.
5
5
D.
Error
गलती
Question No# :
31
out of 50
Which company developed JavaScript?
जावास्क्रिप्ट को किस कंपनी ने डेवलप किया?
A.
Microsoft
Microsoft
B.
Sun Microsystems
Sun Microsystems
C.
Netscape
Netscape
D.
Oracle
Oracle
Question No# :
32
out of 50
What is the output of the following code let a = 10; let b = a--; console.log(a, b);
निम्नलिखित कोड का परिणाम क्या है let a = 10; let b = a--; console.log(a, b);
A.
10 10
10 10
B.
9 10
9 10
C.
9 9
9 9
D.
10 9
10 9
Question No# :
33
out of 50
Which function is used to call a function repeatedly with a fixed time interval
किसी फ़ंक्शन को एक निश्चित समय अंतराल के साथ बार-बार कॉल करने के लिए किस फ़ंक्शन का उपयोग किया जाता है
A.
setTimeout()
सेटटाइमआउट()
B.
setInterval()
सेटइंटरवल()
C.
repeat()
दोहराना()
D.
loop()
लूप
Question No# :
34
out of 50
Which of the following is a valid JavaScript variable name
निम्नलिखित में से कौन सा एक वैध जावास्क्रिप्ट वैरिएबल नाम है
A.
2variable
2वैरिएबल
B.
variable-2
वैरिएबल 2
C.
my variable
my variable
D.
my variable2
my variable2
Question No# :
35
out of 50
What is the output of the following code let a = 2, b = 3, c = 4; a = b = c; console.log(a, b, c);
निम्नलिखित कोड का परिणाम क्या है let a = 2, b = 3, c = 4; a = b = c; console.log(a, b, c);
A.
243
243
B.
444
444
C.
2 2 2
2 2 2
D.
432
432
Question No# :
36
out of 50
Find the only statement in the following that is correct.
निम्नलिखित में से केवल वही कथन ज्ञात कीजिए जो सही है।
A.
JavaScript interpreter processes programs written in Java.
जावास्क्रिप्ट इन्टरप्रेटर जावा में लिखे गए प्रोग्राम्स को प्रोसेस करता है।
B.
JavaScript interpreter processes commands in a script written in JavaScript.
जावास्क्रिप्ट इन्टरप्रेटर जावास्क्रिप्ट में लिखी गई स्क्रिप्ट में कमांड को प्रोसेस करता है।
C.
Java and JavaScript are almost similar
जावा और जावास्क्रिप्ट लगभग समान हैं
D.
JavaScript cannot be embedded in HTML.
जावास्क्रिप्ट को HTML में एम्बेड नहीं किया जा सकता है।
Question No# :
37
out of 50
What happens if no case in a switch statement matches the condition
यदि स्विच स्टेटमेंट में कोई भी मामला स्थिति से मेल नहीं खाता तो क्या होता है
A.
The program throws an error
The program throws an error
B.
The default case is executed (if defined
डिफ़ॉल्ट केस निष्पादित किया जाता है (यदि परिभाषित किया गया है)
C.
Contrast
अंतर
D.
None of the above
इनमे से कोई भी नहीं
Question No# :
38
out of 50
Which of the following correctly represents the ternary operator syntax
निम्नलिखित में से कौन टर्नरी ऑपरेटर सिंटैक्स का सही प्रतिनिधित्व करता है
A.
condition ? True statement : false statement
स्थिति ? सत्य कथन : असत्य कथन
B.
condition : true statement ? False statement
शर्त : सत्य कथन ? झूठा कथन
C.
condition ? (true statement : false statement)
स्थिति ? (सच्चा कथन : गलत कथन)
D.
condition then true statement else false statement
शर्त तब सत्य कथन अन्यथा असत्य कथन
Question No# :
39
out of 50
JavaScript is a _______ language
जावास्क्रिप्ट एक _______ भाषा है
A.
Compiled
संकलित
B.
Interpreted
व्याख्या की
C.
Markup
मार्कअप
D.
Styling
स्टैलिग
Question No# :
40
out of 50
What is JavaScript
जावास्क्रिप्ट क्या है
A.
A programming language for creating static pages
स्थिर पेज बनाने के लिए एक प्रोग्रामिंग भाषा
B.
A scripting language for creating interactive web pages
इंटरैक्टिव वेब पेज बनाने के लिए एक स्क्रिप्टिंग भाषा
C.
A styling language for designing web pages
वेब पेज डिज़ाइन करने के लिए एक स्टाइलिंग भाषा
D.
A database query language
एक डेटाबेस क्वेरी भाषा
Question No# :
41
out of 50
What is the associativity of the assignment operator (=)
असाइनमेंट ऑपरेटर की संबद्धता क्या है (=)
A.
Left-to-right
बाएं से दायां
B.
Right-to-left
दाएं से बाएं
C.
Top-to-bottom
नीचे से ऊपर
D.
Undefined
अपरिभाषित
Question No# :
42
out of 50
Which operator has the highest precedence in JavaScript
जावास्क्रिप्ट में किस ऑपरेटर को सर्वोच्च प्राथमिकता प्राप्त है
A.
* (Multiplication)
* (गुणा)
B.
() (Parentheses)
() (कोष्ठक)
C.
++ (Increment)
++ (वृद्धि)
D.
= (Assignment)
= (असाइनमेंट)
Question No# :
43
out of 50
How do you write a comment in JavaScript
आप जावास्क्रिप्ट में टिप्पणी कैसे लिखते हैं
A.
<!-- Comment -->
<!-- टिप्पणी -->
B.
# Comment
# टिप्पणी
C.
// Comment
// टिप्पणी
D.
** Comment **
** टिप्पणी **
Question No# :
44
out of 50
Javascript is _____ language
जावास्क्रिप्ट _____ भाषा है
A.
Client Side
Client Side
B.
Server Side
Server Side
C.
Both A and B
Both A and B
D.
None of These
None of These
Question No# :
45
out of 50
How many times will the following loop execute How many times will the following loop execute? for (let i = 0; i < 5; i++) { console.log(i); }
निम्नलिखित लूप कितनी बार निष्पादित होगा for (let i = 0; i < 5; i++) { console.log(i); }
A.
4
4
B.
5
5
C.
6
6
D.
Infinite
अनंत
Question No# :
46
out of 50
Inside which HTML element do we put the JavaScript?
HTML पेज में जावास्क्रिप्ट कोड लिखने के लिए किस टैग का इस्तेमाल करेंगे
A.
<javascript>
<javascript>
B.
<script>
<script>
C.
<scripting>
<scripting>
D.
<link>
<link>
Question No# :
47
out of 50
Which operator is used for strict equality comparison in JavaScript
जावास्क्रिप्ट में सख्त समानता तुलना के लिए किस ऑपरेटर का उपयोग किया जाता है
A.
=
=
B.
==
==
C.
===
===
D.
!=
!=
Question No# :
48
out of 50
Which of the following is equivalent to i += 1
निम्नलिखित में से कौन सा i += 1 के समतुल्य है
A.
i++
i++
B.
--i
--i
C.
Both a) and b)
ए) और बी) दोनों b)
D.
None of the above
इनमे से कोई भी नहीं
Question No# :
49
out of 50
How do you check if a variable x is not equal to 5 in JavaScript
आप कैसे जांचेंगे कि जावास्क्रिप्ट में एक वेरिएबल x 5 के बराबर नहीं है
A.
x =! 5
x =! 5
B.
x !== 5
x !== 5
C.
x != 5
x != 5
D.
Both b) and c)
Both b) and c)
Question No# :
50
out of 50
What is the correct JavaScript syntax to write Hello World?
What is the correct JavaScript syntax to write Hello World?
A.
System.out.println("Hello Word")
System.out.println("Hello Word")
B.
println ("Hello Word")
println ("Hello Word")
C.
document.write("Hello Word")
document.write("Hello Word")
D.
response.write("Hello Word")
response.write("Hello Word")
Latest Current Affairs 2025
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test 2025
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
Best Java Training Institute in Prayagraj (Allahabad)
Best Python Training Institute in Prayagraj (Allahabad)
O Level Online Test in Hindi
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Naukari Notification
Best Website and Software Company in Allahabad
Sarkari Exam Quiz