page-banner
WDP M2-R5.1 Quiz-10
Q 1.
JS में ईवेंट हैंडलर्स की आवश्यकता क्यों है?

Why are event handlers needed in JS?

A. Allows JavaScript code to change the behavior of Windows

B. Adds the innerHTML page to the code

C. change server location

D. handles exceptions and events

Q 2.
निम्नलिखित में से कौन सा ढांचा नहीं है?

Which of the following is not a structure?

A. Javascript .NET

B. Javascript

C. Cocoa JS

D. jQuery

Q 3.
निम्नलिखित में से कौन सी प्रॉपर्टी जेएस त्रुटियों के जवाब में ट्रिगर होती है?

Which of the following property is triggered in response to JS errors?

A. onclick

B. onerror

C. on message

D. an exception

Q 4.
निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा?

What will be the output of the following JavaScript code?
function compare() {
    int a=1;
    char b=1;
    if(a.tostring()===b)
        return true;
    else 
        return false;
}

A. runtime error

B. Logical error

C. true

D. false

Q 5.
हम किस HTML एलीमेंट में जावास्क्रिप्ट कोड डालते हैं?

Which HTML element do we use to insert JavaScript code?

A. <javascript>...</javascript>

B. <js>...</js>

C. <script>...</script>

D. <css>...</css>

Q 6.
निम्नलिखित में से कौन जावास्क्रिप्ट में त्रुटि नहीं है?

Which of the following is not an error in JavaScript?

A. missing bracket

B. division by zero

C. syntax error

D. absence of semicolon

Q 7.
अलग-अलग जावास्क्रिप्ट स्टेटमेंट में किस प्रतीक का उपयोग किया जाता है?

Which symbol is used in different JavaScript statements?

A. a little break (,)

B. colon (:)

C. hyphen (_)

D. semicolon (;)

Q 8.
निम्नलिखित में से किसका उपयोग जावास्क्रिप्ट कोड स्निपेट को कॉल करने के लिए किया जा सकता है?

Which of the following can be used to call a JavaScript code snippet?

A. Function/Method

B. preprocessor

C. triggering event

D. RMI

Q 9.
निम्नलिखित जावास्क्रिप्ट फ़ंक्शन का आउटपुट क्या होगा?

What will be the output of the following JavaScript function?
<p id="demo"></p>
<script>
function javascript() {
    document.getElementById("demo").innerHTML = Math.abs(-7.25);
}
</script>

A. -7.25

B. 7.25

C. -7

D. 7

Q 10.
जावास्क्रिप्ट को ________ अनदेखा करता है?

Ignores Javascript?

A. newlines

B. tab

C. empty space

D. all of the above

Q 11.
निम्नलिखित में से कौन सा सही वर्णन करता है कि जब एक यूनिक्स मशीन पर एक जावास्क्रिप्ट प्रोग्राम विकसित किया जाता है तो क्या होता है?

Which of the following correctly describes what happens when a JavaScript program is developed on a Unix machine?

A. Will work perfectly on Windows machine

B. Javascript will be displayed on the browser as text

C. will throw errors and exceptions

D. should be limited to Unix machine only

Q 12.
एक अधिक कुशल जावास्क्रिप्ट कोड स्निपेट कौन सा है?

Which is a more efficient JavaScript code snippet?

A. Code 1

B. code 2

C. Both code 1 and code 2

D. cannot compare

Q 13.
निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा?

What will be the output of the following JavaScript code?
function range(int javascript) {
int a = 5;
for(int i=0;i<javascript;i++) {
console.log(a);
}
}
range(3);                                    

A. 2

B. 5

C. 555

D. Error

Q 14.
जावास्क्रिप्ट और जावा के बीच बुनियादी अंतर क्या है?

What is the basic difference between JavaScript and Java?

A. functions are considered to be fields

B. Functions are values, and there is no hard distinction between methods and fields

C. variables are specific

D. there is no difference

Q 15.
निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा?

What will be the output of the following JavaScript code?
var quiz = [1,2,3];
var js = [6,7,8];
var result=quiz.concat(js);
document.write(result);

A. 1, 2, 3, 6, 7, 8

B. 123

C. 1, 2, 3

D. Error

Q 16.
जावास्क्रिप्ट इंजन की आवश्यकता क्यों है?

Why is a JavaScript engine needed?

A. both compiling and interpreting JavaScript

B. parsing javascript

C. Interpreting Javascript

D. Compiling to Javascript

Q 17.
जावास्क्रिप्ट _____ की प्रोग्रामिंग भाषा है।

JavaScript is the programming language of _____.

A. desktop

B. Mobile

C. Web

D. Server

Q 18.
किसी HTML एलीमेंट को id द्वारा एक्सेस करने के लिए कौन सी जावास्क्रिप्ट विधि का उपयोग किया जाता है?

Which JavaScript method is used to access an HTML element by id?

A. getElementById()

B. gate element (id)

C. getElementById(id)

D. ElementById(id)

Q 19.
अलर्ट बॉक्स में लिखने के लिए किस जावास्क्रिप्ट विधि का उपयोग किया जाता है?

Which JavaScript method is used to write the alert box?

A. window.alertHTML()

B. window.alert()

C. window.alertbox()

D. window.alertContent()

Q 20.
निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा?

What will be the output of the following JavaScript code?
<script>
const myArray = ['h', 'e', 'l', 'l', 'o'];
document.write(myArray[0]);
document.write(myArray[1]);
</script>

A. He

B. undefined

C. ValueError

D. type error