0% found this document useful (0 votes)
11 views5 pages

Javascript Questions Answers Hinglish

This document provides a comprehensive list of JavaScript questions and answers in Hinglish, covering fundamental concepts such as data types, variable declarations, functions, asynchronous programming, and error handling. It includes explanations of advanced topics like closures, higher-order functions, and ES6 features. The content serves as a useful resource for learners seeking to understand JavaScript programming.

Uploaded by

mansvee.websenor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views5 pages

Javascript Questions Answers Hinglish

This document provides a comprehensive list of JavaScript questions and answers in Hinglish, covering fundamental concepts such as data types, variable declarations, functions, asynchronous programming, and error handling. It includes explanations of advanced topics like closures, higher-order functions, and ES6 features. The content serves as a useful resource for learners seeking to understand JavaScript programming.

Uploaded by

mansvee.websenor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Comprehensive JavaScript Questions and Answers (Hinglish)

1. JavaScript kya hai? JavaScript ka use kaha hota hai?

1. JavaScript ek high-level, interpreted programming language hai jo primarily web pages me

interactivity aur functionality add karne ke liye use hoti hai.

2. JavaScript ke data types kya kya hote hain?

2. JavaScript me 6 main data types hote hain: String, Number, Boolean, Undefined, Null, aur Object.

3. Difference between var, let aur const?

3. 'var' ka use purani JavaScript versions me hota tha, jo function scope ke saath aata tha. 'let' aur

'const' block-scoped hote hain. 'const' ka use constant values ke liye kiya jata hai.

4. JavaScript me function kaise banate hain?

4. JavaScript me function define karne ke liye 'function' keyword ka use kiya jata hai, jaise: function

myFunction() { // code }

5. Arrow function kya hota hai? Example dikhaiye.

5. Arrow functions concise syntax provide karte hain aur 'this' keyword ko lexical scope se inherit

karte hain. Example: const add = (a, b) => a + b;

6. Hoisting kya hota hai? Yeh kis type ke variables par hota hai?

6. Hoisting ek JavaScript behavior hai jisme variables aur functions ko unke declaration se pehle

access kiya ja sakta hai.

7. JavaScript me closures kaise kaam karte hain?

7. Closures wo function hote hain jo apne outer function ke variables ko access kar sakte hain even
after the outer function has finished executing.

8. Higher-order functions kya hote hain? Example batao.

8. Higher-order functions wo functions hote hain jo dusre functions ko argument ke roop me lete

hain ya return karte hain.

9. JavaScript me 'this' keyword ka kya role hai?

9. 'this' keyword current context (function, object) ko refer karta hai. Example: this.name will refer to

the 'name' property of the object.

10. JavaScript me callback function kya hai?

10. Callback functions wo functions hote hain jo dusre function ko argument ke roop me pass kiye

jate hain aur function ke complete hone par call kiye jate hain.

11. Promise kya hota hai aur kaise kaam karta hai?

11. Promise ek object hai jo asynchronous operation ko represent karta hai. Yeh 'pending',

'resolved' (fulfilled) ya 'rejected' state me ho sakta hai.

12. Asynchronous aur synchronous programming me kya difference hai?

12. Asynchronous programming me operations ek time pe chal rahe hote hain, aur synchronous me

ek ke baad ek.

13. JavaScript me array methods like map(), filter(), reduce() kaise kaam karte hain?

13. map() array ke har item pe function apply karta hai, filter() array se specific elements ko select

karta hai, aur reduce() array ko single value me reduce karta hai.

14. JavaScript me event delegation kya hota hai?


14. Event delegation ek technique hai jisme parent element me event listener lagaya jata hai aur

child elements ke events handle kiye jate hain.

15. DOM manipulation kaise hoti hai? Example batao.

15. DOM manipulation se elements ko add, delete ya modify kiya jata hai. Example:

document.getElementById('myElement').innerHTML = 'Hello!';

16. JavaScript me classes kaise banate hain?

16. JavaScript me classes ko 'class' keyword se define kiya jata hai, jaise: class Person {

constructor(name) { this.name = name; } }

17. ES6 features kaun se hain jo JavaScript me introduce hue hain?

17. ES6 features me arrow functions, template literals, destructuring, spread/rest operators,

promises, classes, modules, aur async/await included hain.

18. Template literals kya hote hain aur kaise use karte hain?

18. Template literals strings ko dynamically generate karne ka easy tarika hain. Example: let

message = `Hello, ${name}`;

19. Destructuring assignment kaise kaam karta hai?

19. Destructuring se variables ko easily assign kiya ja sakta hai from arrays or objects. Example: let

[a, b] = [1, 2];

20. Spread aur rest operator ka use kaise karte hain?

20. Spread operator array ya object ko expand karta hai. Rest operator function parameters ko

gather karta hai.


21. JavaScript me error handling kaise hoti hai? Try-catch ka example dikhaiye.

21. Error handling me try-catch block ka use hota hai. Example: try { // code } catch (error) {

console.log(error); }

22. JavaScript me modules ka use kaise karte hain?

22. JavaScript modules se code ko separate files me organize kiya jata hai. import/export ka use

hota hai.

23. Event loop kya hota hai aur JavaScript me kaise kaam karta hai?

23. Event loop JavaScript ke asynchronous operations ko manage karta hai. Yeh stack ko check

karta hai aur tasks ko execute karta hai jab stack empty hota hai.

24. JavaScript me memory leak kya hota hai aur kaise avoid karte hain?

24. Memory leak tab hota hai jab unnecessary objects ya variables memory me rehte hain. Avoid

karne ke liye, references ko null karna padta hai.

25. JavaScript me deep copy aur shallow copy me kya difference hai?

25. Deep copy me object ka ek naya copy banta hai, jabki shallow copy me references copy hote

hain.

26. JavaScript me localStorage aur sessionStorage me kya difference hai?

26. localStorage me data browser ke session ke beyond persist rehta hai, jabki sessionStorage sirf

ek session ke liye hota hai.

27. What is the difference between == and === in JavaScript?

27. '==' sirf value compare karta hai, jabki '===' value aur type dono ko compare karta hai.
28. JavaScript me closures ka real-world example dikhaiye.

28. Closures ka real-world example ho sakta hai ek function jo private variables ko access kare,

jaise ek counter function.

29. JavaScript me recursion ka use kab aur kaise karte hain?

29. Recursion me function apne aap ko call karta hai jab tak condition satisfied nahi hoti. Example:

function factorial(n) { return n === 0 ? 1 : n * factorial(n - 1); }

30. JavaScript me call, apply aur bind ka difference kya hai?

30. call(), apply() aur bind() teeno functions 'this' ko manually set karne me help karte hain, lekin call

aur apply arguments ko directly pass karte hain, jabki bind ek naya function return karta hai.

You might also like