1. What is JavaScript?
    JavaScript is a high-level, interpreted programming language used to create interactive web pages.
  2. What are the different data types in JavaScript?
    String, Number, Boolean, Undefined, Null, Object, Symbol, BigInt.
  3. What is a variable in JavaScript?
    A variable is used to store data values.
  4. Difference between var, let, and const?
    var – function scoped, let – block scoped, const – block scoped and cannot be reassigned.
  5. What is an array?
    An array stores multiple values in a single variable.
  6. What is an object?
    An object is a collection of key-value pairs.
  7. What is a function?
    A function is a reusable block of code.
  8. What is the use of console.log()?
    It is used to print output in the browser console.
  9. What is undefined?
    A variable declared but not assigned a value.
  10. What is null?
    It represents an empty or unknown value.
  11. What is NaN?
    NaN means Not a Number.
  12. What is the typeof operator?
    It is used to check the type of a variable.
  13. What are operators in JavaScript?
    Operators are used to perform operations on variables.
  14. What is a conditional statement?
    Used to perform different actions based on conditions.
  15. What is if statement?
    Executes code if the condition is true.
  16. What is switch statement?
    Used to perform different actions based on multiple cases.
  17. What is a loop?
    Loops are used to execute code repeatedly.
  18. Types of loops?
    for, while, do-while, for-in, for-of.
  19. What is break statement?
    Stops the loop execution.
  20. What is continue statement?
    Skips the current iteration.
  21. What is string?
    A sequence of characters.
  22. What is template literal?
    Allows embedded expressions using backticks.
  23. What is concatenation?
    Combining two or more strings.
  24. What is parseInt()?
    Converts a string into an integer.
  25. What is parseFloat()?
    Converts a string into a floating number.
  26. What is isNaN()?
    Checks whether a value is NaN.
  27. What is an event?
    An action performed by the user like click or hover.
  28. What is alert()?
    Displays a popup message.
  29. What is prompt()?
    Displays a popup to get user input.
  30. What is confirm()?
    Displays a confirmation dialog box.
  31. What is DOM?
    DOM stands for Document Object Model.
  32. What is DOM manipulation?
    Changing HTML elements using JavaScript.
  33. What is document.getElementById()?
    Selects an element by its ID.
  34. What is querySelector()?
    Selects the first matching element.
  35. What is querySelectorAll()?
    Selects all matching elements.
  36. What is an event listener?
    Listens for events like click or keypress.
  37. What is addEventListener()?
    Method used to attach events to elements.
  38. What is closure?
    A function having access to its outer function scope.
  39. What is hoisting?
    Variables and functions are moved to the top of scope.
  40. What is scope?
    Defines accessibility of variables.
  41. Types of scope?
    Global scope and local scope.
  42. What is callback function?
    A function passed as an argument to another function.
  43. What is arrow function?
    Short syntax for writing functions.
  44. What is map()?
    Creates a new array by applying a function.
  45. What is filter()?
    Filters elements based on condition.
  46. What is reduce()?
    Reduces array values to a single value.
  47. What is JSON?
    JavaScript Object Notation used for data exchange.
  48. What is JSON.parse()?
    Converts JSON string into object.
  49. What is JSON.stringify()?
    Converts object into JSON string.
  50. What is setTimeout()?
    Executes code after specific time.
  51. What is setInterval()?
    Executes code repeatedly after intervals.
  52. What is localStorage?
    Stores data in browser permanently.
  53. What is sessionStorage?
    Stores data temporarily for a session.
  54. What is try-catch?
    Used for error handling.
  55. What is throw?
    Used to create custom errors.
  56. What is destructuring?
    Extracting values from arrays or objects.
  57. What is spread operator?
    Used to expand elements.
  58. What is rest operator?
    Collects multiple elements into array.
  59. What is default parameter?
    Assigns default value to function parameters.
  60. What is strict mode?
    Helps write secure JavaScript.
  1. What is promise?
    An object representing asynchronous operation.
  2. Promise states?
    Pending, Fulfilled, Rejected.
  3. What is async function?
    Function that returns a promise.
  4. What is await?
    Waits for promise to resolve.
  5. What is event loop?
    Handles asynchronous callbacks.
  6. What is prototype?
    Object from which other objects inherit properties.
  7. What is prototypal inheritance?
    Objects inherit properties from another object.
  8. What is class in JavaScript?
    Template for creating objects.
  9. What is constructor?
    Special method for creating objects.
  10. What is module?
    Reusable code file.
  11. What is export?
    Used to export variables/functions.
  12. What is import?
    Used to import modules.
  13. What is debounce?
    Limits function execution.
  14. What is throttle?
    Limits function execution frequency.
  15. What is memory leak?
    Unused memory not released.
  16. What is garbage collection?
    Automatically removes unused memory.
  17. What is Web API?
    Browser features accessible through JavaScript.
  18. What is fetch API?
    Used to make HTTP requests.
  19. What is CORS?
    Cross-Origin Resource Sharing policy.
  20. What is Single Page Application?
    Web app that loads single HTML page.
  21. What is bundler?
    Tool to bundle JavaScript files.
  22. Examples of bundlers?
    Webpack, Parcel, Vite.
  23. What is transpiler?
    Converts modern JS to older JS.
  24. Example of transpiler?
    Babel.
  25. What is tree shaking?
    Removes unused code.
  26. What is lazy loading?
    Loads code only when needed.
  27. What is service worker?
    Script running in background.
  28. What is PWA?
    Progressive Web Application.
  29. What is SSR?
    Server Side Rendering.
  30. What is CSR?
    Client Side Rendering.

📢 Join Our WhatsApp Channel

💼 Get Daily IT Job Updates, Interview Preparation Tips & Instant Alerts directly on WhatsApp.

👉 Join WhatsApp Now

📢 Join Our Telegram Channel

💼 Get Daily IT Job Updates, Interview Tips & Exclusive Alerts directly on Telegram!

👉 Join Telegram

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2022 - 2025 itfreesource.com

Enable Notifications OK No thanks