JavaScript Basics, Intermediate, and Advanced Q&A

Next Part :) 🔥 BEGINNER (10 Q&A) • Q1: What is typeof operator? 👉 Used to check the data type of a variable • Q2: What is null vs undefined? 👉 null = intentional empty value 👉 undefined = variable declared but not assigned • Q3: What is strict mode in JS? 👉 Enables stricter parsing & error handling • Q4: What is template literal? 👉 String using backticks (`) for interpolation • Q5: What is default parameter? 👉 Function parameter with default value • Q6: What is JSX? 👉 Syntax that looks like HTML used in React • Q7: What is fragment in React? 👉 Wrapper without extra DOM node • Q8: What is onClick event? 👉 Event handler for click actions • Q9: What is inline styling in React? 👉 Applying styles using JS objects • Q10: What is export default? 👉 Export a single value from a file ⚡ INTERMEDIATE (10 Q&A) • Q1: What is shallow copy vs deep copy? 👉 Shallow: copies reference 👉 Deep: copies full structure • Q2: What is spread operator? 👉 Expands elements or objects • Q3: What is rest parameter? 👉 Collects multiple arguments into array • Q4: What is destructuring? 👉 Extract values from objects/arrays • Q5: What is optional chaining? 👉 Safely access nested properties • Q6: What is nullish coalescing (??)? 👉 Returns right value if left is null/undefined • Q7: What is synthetic event in React? 👉 Cross-browser wrapper around native events • Q8: What is forwardRef? 👉 Pass ref to child component • Q9: What is prop drilling? 👉 Passing props through many layers • Q10: What is dynamic rendering? 👉 Rendering UI based on conditions/data 🚀 ADVANCED (18 Q&A) • Q1: What is currying? 👉 Transform function with multiple args into nested functions • Q2: What is pure function? 👉 Same input → same output, no side effects • Q3: What is immutability? 👉 Data cannot be modified directly • Q4: What is garbage collection? 👉 Automatic memory cleanup • Q5: What is Webpack? 👉 Module bundler • Q6: What is Babel? 👉 JS compiler for modern syntax • Q7: What is tree shaking? 👉 Removing unused code • Q8: What is reconciliation keys importance? 👉 Helps efficient DOM updates • Q9: What is controlled vs uncontrolled component? 👉 Controlled: React state 👉 Uncontrolled: DOM handles state • Q10: What is React.StrictMode double render? 👉 Helps detect side effects in dev • Q11: What is batching in React? 👉 Grouping multiple state updates • Q12: What is stale closure problem? 👉 Using outdated state inside closure • Q13: What is dependency array in useEffect? 👉 Controls when effect runs • Q14: What is suspense in React? 👉 Handles async loading • Q15: What is concurrent rendering? 👉 Interruptible rendering for better UX • Q16: What is useId? 👉 Generate unique IDs • Q17: What is render props pattern? 👉 Sharing logic via function props • Q18: What is compound component pattern? 👉 Components working together as one #ReactJS #JavaScript #FrontendInterview #WebDevelopment #Coding #FrontendDevelopment

To view or add a comment, sign in

Explore content categories