JavaScript Question and Answers | O Level Web Designing Paper M2-R5

javascript questions and answers for interview

O Level Web Designing Paper (M2-R5) | JavaScript Question and Answers


1- जावास्क्रिप्ट क्या है?
1- What is JavaScript?

a) JavaScript is a scripting language used to make the website interactive
b) JavaScript is an assembly language used to make the website interactive
c) JavaScript is a compiled language used to make the website interactive
d) None of the mentioned

Ans :-  (a) JavaScript is a scripting language used to make the website interactive  

2- जावास्क्रिप्ट के बारे में निम्नलिखित में से कौन सा सही है?
2- Which of the following is correct about JavaScript?
a) JavaScript is an Object-Based language
b) JavaScript is Assembly-language
c) JavaScript is an Object-Oriented language
d) JavaScript is a High-level language

Ans :-  (a) JavaScript is an Object-Based language   

3- दिए गए कथनों में से कौन सा कथन जावास्क्रिप्ट को निकटता से परिभाषित करता है?
3- Among the given statements, which statement defines closures in JavaScript?

a) JavaScript is a function that is enclosed with references to its inner function scope
b) JavaScript is a function that is enclosed with references to its lexical environment
c) JavaScript is a function that is enclosed with the object to its inner function scope
d) none of the mentioned

Ans :-  (b) JavaScript is a function that is enclosed with references to its lexical environment   

4- निम्नलिखित जावास्क्रिप्ट कोड स्निपेट का आउटपुट क्या होगा?
4- What will be the output of the following JavaScript code snippet?

<p id="demo"></p>
var txt1 = "National_";
var txt2 = "Javascriptmcq";
document.getElementById("demo").innerHTML = txt1 + txt2;

a) error
b) National_  Javascriptmcq
c) undefined
d) National_Javascriptmcq

Ans :-  (d) National_Javascriptmcq   

5- निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा? 
5- What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
var niim = 10;
niim *=5;document.getElementById("demo").innerHTML =niim;</script>

a) 10
b) 50
c) 5
d) Error

Ans :-  (b) 50   

6- निम्नलिखित में से कौन सा जावास्क्रिप्ट डेटा प्रकार नहीं है?
6- Which of the following is not JavaScript data types?

a) Null type
b) Undefined type
c) Number type
d) All of the mentioned

Ans :-  (d) All of the mentioned   

7- एचटीएमएल दस्तावेज़ों में क्लाइंट-साइड जावास्क्रिप्ट कोड कहाँ अंतर्निहित होता है?
7. Where is Client-side JavaScript code is embedded within HTML documents?

a) A URL that uses the special javascript:code
b) A URL that uses the special javascript:protocol
c) A URL that uses the special javascript:encoding
d) A URL that uses the special javascript:stack

Ans :-  (b) A URL that uses the special javascript:protocol  

8- निम्नलिखित जावास्क्रिप्ट कोड स्निपेट का आउटपुट क्या होगा?
8- What will be the output of the following JavaScript code snippet?

int a=1;
if(a!=null) // JavaScript not equal to Operators   
return 1;
else   
return 0;

a) 0
b) 1
c) compiler error
d) runtime error

Ans :-  (b) 1   

9- निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा।
9- What will be the output of the following JavaScript code.

// JavaScript code snippet to compare the height
function height( ) {        
var  height = 123.56;   
var type = (height>=190) ? "tall" : "short";  
 return type;  }

a) short
b) 123.56
c) tall
d) 190

Ans :-  (a) short    

10- जावास्क्रिप्ट कोड स्निपेट को कॉल करने के लिए निम्नलिखित में से किसका उपयोग किया जा सकता है?
10- Which of the following can be used to call a JavaScript Code Snippet?

a) Function/Method
b) Preprocessor
c) Triggering Event
d) RMI

Ans :-  (a) Function/Method   

11- जावास्क्रिप्ट इंजन की आवश्यकता क्यों है?
11- Why JavaScript Engine is needed?

a) Both Compiling & Interpreting the JavaScript
b) Parsing the JavaScript
c) Interpreting the JavaScript
d) Compiling the JavaScript

Ans :-  (c) Interpreting the JavaScript   

12. जावास्क्रिप्ट और जावा के बीच बुनियादी अंतर क्या है?
12. What is the basic difference between JavaScript and Java?

a) Functions are considered as fields
b) Functions are values, and there is no hard distinction between methods and fields
c) Variables are specific
d) There is no difference

Ans :-  (b) Functions are values, and there is no hard distinction between methods and fields   

13- JS में इवेंट हैंडलर की आवश्यकता क्यों है?
13- Why event handlers is needed in JS?

a) Allows JavaScript code to alter the behavior of windows
b) Adds innerHTML page to the code
c) Change the server location
d) Performs handling of exceptions and occurrences

Ans :-  (a) Allows JavaScript code to alter the behavior of windows   

14. निम्नलिखित में से कौन सी जावास्क्रिप्ट में त्रुटि नहीं है?
14. Which of the following is not an error in JavaScript?

a) Missing of Bracket
b) Division by zero
c) Syntax error
d) Missing of semicolons

Ans :-  (b) Division by zero   

15. जावास्क्रिप्ट में किसी फ़ंक्शन या विधि को कॉल करने के लिए निम्नलिखित में से किसका उपयोग किया जाता है:
15. Which one of the following is used for the calling a function or a method in the
JavaScript:

a) Property Access Expression
b) Functional expression
c) Invocation expression
d) Primary expression

Ans :-  c)  Invocation expression   

16. अव्यवस्थित संपत्तियों का एक सेट, जिसका एक नाम और मूल्य होता है, ______ कहलाता है।
16. A set of unordered properties that, has a name and value is called______.

a) String
b) Array
c) Serialized Object
d) Object

Ans :-  d) Object   

17. जब दुभाषिया को खाली कथन मिलते हैं, तो वह क्या करेगा:
17. When interpreter encounters an empty statements, what it will do:

a) Shows a warning
b) Prompts to complete the statement
c) Throws an error
d) Ignores the statements

Ans :-  d)  Ignores the statements   

18. यदि नाम समान हैं तो निम्नलिखित में से कौन सा वेरिएबल दूसरों पर प्राथमिकता लेता है?
18. Which of the following variables takes precedence over the others if the names are the same?

a) Global variable
b) The local element
c) The two of the above
d) None of the above

Ans :-  b) The local element   

19. एंगुलर जेएस में नियंत्रक और दृश्य के बीच डेटा साझा करने के लिए निम्नलिखित में से किसका उपयोग किया जाता है?
19. Which of the following is used to share data between controller and view in Angular JS?

a) Using Model
b) Using services
c) Using factory
d) Using $scope

Ans :-  b) Using Services   

20. निम्नलिखित में से कौन सा एक टर्नरी ऑपरेटर है:
20. Which one of the following is an ternary operator:

a)  ?
b)  :
c)  -
d)  +

Ans :-  a) ?   

21. AngularJS में, सर्वर पर Ajax कॉल करने के लिए $http सेवा का उपयोग किया जाता है।
21. In AngularJS, the $http service is used to make an Ajax call to the server.

a) True
b) False

Ans :-  a) True   

22- मान लीजिए हमारे पास एक टेक्स्ट "human" है जिसे हम "new" ऑपरेटर का उपयोग किए बिना स्ट्रिंग में परिवर्तित करना चाहते हैं। ऐसा करने का निम्नलिखित में से सही तरीका कौन सा है:
22- Suppose we have a text "human" that we want to convert into string without using the "new" operator. Which is the correct way from the following to do so:

a) human.toString()
b) String(human)
c) String newvariable="human"
d) Both a and b

Ans :-  d) Both a and b  

23. निम्नलिखित में से कौन सा Angular JS का लाभ है?
23. Which of the following is an advantage of Angular JS?

a) Angular JS code is unit testable.
b) Angular JS provides reusable components.
c) Angular JS uses dependency injection and makes use of separation of concerns.
d) All of the above

Ans :-   d) All of the above  

24. निम्नलिखित में से कौन सा वैध AngularJS फ़िल्टर नहीं है?
24. Which of the following is not a valid AngularJS filter?

a) Owercase
b) Orderby
c) Email
d) Currency

Ans :- c) Email   

25. "फ़ंक्शन" और "var" को कहा जाता है:
25. The "function" and " var" are known as:

a) Keywords
b) Data types
c) Declaration statements
d) Prototypes

Ans :-  c) Declaration statements   

26. OLE का मतलब है?
26. OLE stands for?

a) Object-level embedding
b) Object linking and embedding
c) Object-level extraction
d) None of the above

Ans :-  b) Object linking and embedding  

27. क्या एंगुलर जेएस पुन: प्रयोज्य घटक प्रदान करता है?
27. Do Angular JS provide reusable components?

a) True
b) False

Ans :-  (a) True   

28. जावास्क्रिप्ट में, फ़ंक्शन, परिभाषा, अभिव्यक्ति को कॉल करने के लिए क्या उपयोग किया जाएगा:
28. In JavaScript, what will be used for calling the function definition expression:

a) Function prototype
b) Function literal
c) Function calling
d) Function declaration

Ans :-  b) Function literal   

29. जावास्क्रिप्ट कोड को कॉल करने का सही तरीका निम्नलिखित में से कौन सा है?
29. Which one of the following is the correct way for calling the JavaScript code?

a) Preprocessor
b) Triggering Event
c) RMI
d) Function/Method

Ans :-  d)  Function/Method   

30. जावास्क्रिप्ट में, स्टेटमेंट का ब्लॉक क्या है?
30. In JavaScript, what is a block of statement?

a) Conditional block
b) Block that combines a number of statements into a single compound statement
c) Both conditional block and a single statement
d) Block that contains a single statement

Ans :-  b)  Block that combines a number of statements into a single compound statement   

Post a Comment

0 Comments