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