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

Interview

Uploaded by

Sonu Kumar
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)
3 views5 pages

Interview

Uploaded by

Sonu Kumar
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

html

1. how to create a responsive table without using CSS frameworks. Handle


horizontal scroll, collapsing rows, and minimum cell width.

2. difference between rel="preload", prefetch, and preconnect in the


<link> tag. How do they impact performance.

3. What is the difference between label with for attribute and wrapping the
input directly inside the label?

Deep Insight:

●​ What happens when both are used together?


●​ How does it affect click-to-focus behavior?

4 What is the difference between input type="submit" vs <button


type="submit"> in forms?

Deep Insight:

●​ How do both behave in different browsers?


●​ Which is more flexible with HTML content and styles?
css
1.​ What is the difference between em, rem, %, vh, vw units? When would you
use one over another?

Deep Insight:

●​ How em and rem behave differently with nested elements?

2.​ How does z-index work in CSS? Why doesn’t it work sometimes even
when the number is high.
●​ How to debug z-index issues with dev tools?

3. What is the difference between display: none and visibility:


hidden? How do they affect the DOM and layout?

Deep Insight:

●​ How they affect animations, accessibility, keyboard navigation


●​ Does visibility: hidden reserve space in the layout?

4. How does calc() work in CSS, and what are its limitations?

Does it work inside media queries?

5. How can you create a fully responsive, complex UI without using media queries?

6.what is the difference between pseudo elements and pseudo classes


Javascript
Promise,
Closures,
event loop,
What is throttling in JavaScript?

1.​ What is the difference between == and === in JavaScript?


What will be output of this code
console.log([] == false); // true
console.log([] === false); // false

2.​ Explain the concept of closures in JavaScript. How does memory


management work with closures?
3.​
4.​ How does JavaScript handle asynchronous code execution in the event
loop? What are microtasks and macrotasks?

Deep Dive:

●​ Difference between setTimeout and Promise.


●​ Execution order: Microtasks (Promises, MutationObserver) vs Macrotasks
(setTimeout, setInterval).

console.log("Start");
setTimeout(() => console.log("Timeout"), 0);
Promise.resolve().then(() => console.log("Promise"));
console.log("End");
5 What is this in JavaScript? How does its value change in arrow functions vs
regular functions?
Deep Dive:

●​ How to manipulate this with .call(), .apply(), .bind().


●​ Differences in lexical vs dynamic binding.

6. Difference between function declaration vs expression in hoisting.

=>What will be output of this code

console.log(a); // undefined
var a = 5;

console.log(b); // ReferenceError
let b = 10;

7. How does JavaScript manage memory? What are memory leaks and how can
they be prevented?
Deep Dive:

●​ How JS allocates memory: Stack vs Heap.


●​ How to use Chrome DevTools to detect memory leaks.

8. What are Proxies in JavaScript and how can they be used for meta-programming?

9. How can you simulate a debounce or throttle function in JavaScript?

10. What is a Module Pattern in JavaScript? How can it be used to create private and public
methods?

Example:
const Counter = (function () {
let count = 0;
return {
increment() {
count++;
console.log(count);
},
reset() {
count = 0;
}
};
})();

You might also like