Javascript

Level: Beginner

1. What is JavaScript?
2. How do you declare a variable in JavaScript?
3. What are the basic data types in JavaScript?
4. How do you comment in JavaScript?
5. What are the different ways to include JavaScript in an HTML file?
6. How do you write an if statement in JavaScript?
7. What is a for loop in JavaScript?
8. How do you declare and call a function in JavaScript?
9. Explain the concept of scope in JavaScript.
10. What is the difference between == and === in JavaScript?
11. How do you create an array in JavaScript?
12. How do you access the elements of an array in JavaScript?
13. Explain the concept of objects in JavaScript.
14. How do you create an object in JavaScript?
15. How do you access the properties of an object in JavaScript?
16. What is a method in JavaScript?
17. How do you add new elements to an array in JavaScript?
18. Explain the concept of hoisting in JavaScript.
19. What is the this keyword in JavaScript?
20. How do you handle errors in JavaScript?
21. What are JavaScript callbacks?
22. Explain the concept of asynchronous programming in JavaScript.
23. How do you handle asynchronous operations in JavaScript?
24. What is the setTimeout function used for in JavaScript?
25. How do you use localStorage in JavaScript?
26. What is event delegation in JavaScript?
27. How do you prevent the default behavior of an event in JavaScript?
28. How do you validate forms in JavaScript?
29. Explain the concept of closures in JavaScript.
30. How do you sort an array in JavaScript?
31. What is the difference between null and undefined in JavaScript?
32. How do you concatenate strings in JavaScript?
33. How do you convert a string to a number in JavaScript?
34. How do you convert a number to a string in JavaScript?
35. What are template literals in JavaScript?
36. How do you use map and filter functions in JavaScript?
37. What is the Promise object in JavaScript?
38. How do you create and use a Promise in JavaScript?
39. What is async and await in JavaScript?
40. How do you handle exceptions in async functions in JavaScript?
41. How do you create a class in JavaScript?
42. What are constructors in JavaScript classes?
43. How do you extend a class in JavaScript?
44. Explain the concept of prototype in JavaScript.
45. How do you add methods to an existing prototype in JavaScript?
46. What are arrow functions in JavaScript?
47. How do you use let and const in JavaScript?
48. How do you loop through objects in JavaScript?
49. How do you check if a variable is an array in JavaScript?
50. How do you check the type of a variable in JavaScript?

Intermediate Level: View

Advanced Level: View