Recently came across a set of interview questions that really made me pause and think — the kind that test how deeply you understand JavaScript, TypeScript, and React beyond just syntax 👇 What’s the actual difference between Types and Interfaces in TypeScript — and when should you use each? What does “Hoisting” really mean in JavaScript, and how does it affect your code execution? Can you write polyfills for `call`, `apply`, and `bind` — from scratch, using plain JavaScript? How would you write a function that returns a duplicated array with deeply cloned values, not just copies of references? Can you make a JS program that generates a random alphanumeric string every single time it runs — never repeating the same value? What are Keys in React, and why are they essential for rendering lists efficiently? And finally, can you build something that shows your browser’s height and width in real time, updating automatically as you resize the window? These were actual questions from a frontend interview I had recently — and honestly, they’re great for both self-evaluation and brushing up fundamentals. Try answering a few in the comments or sharing how you would approach them 👇 #JavaScript #TypeScript #ReactJS #FrontendInterview #WebDevelopment #TechCommunity #CodingChallenge #LearnInPublic
Frontend interview questions that test your JavaScript, TypeScript, and React skills
More Relevant Posts
-
🚀 Day 4 of my 4 Days – 4 JavaScript Questions Challenge! Once in a while, you’ll face this classic interview question: 💭 "What is a Prototype in JavaScript?" I remember the first time I was asked this — I completely blanked out 😅 But you don’t have to! Here’s how you can confidently explain it in your next interview 👇 In JavaScript, every function automatically gets a prototype property, which is an empty object by default. This prototype object is used to add properties and methods that can be shared across all instances created by that function (when used as a constructor with new). function Person(name) { this.name = name; } // Adding a method to prototype Person.prototype.greet = function() { console.log("Hello, " + this.name); }; const user1 = new Person("Anurag"); const user2 = new Person("Sachin"); user1.greet(); // Hello, Anurag user2.greet(); // Hello, Sachin Both objects share the same method via the prototype — making it memory-efficient and powerful. 💪 #JavaScript #FrontendDevelopment #WebDevelopment #JSChallenge #LearningByCoding #UIDeveloper #TechJourney #CodingCommunity
To view or add a comment, sign in
-
⚡ Imagine You’re in a JavaScript Interview... The interviewer asks: 🧠 “Can you explain what shimming means in JavaScript — and when you’d actually use it?” Here’s how you can answer 👇 💡 What is a Shim in JavaScript? ✅ A Shim (also known as a Polyfill) is a piece of code that adds support for newer JavaScript features in older browsers or environments that don’t natively support them. ✅ It’s like giving old browsers a “compatibility upgrade” without changing their core engine. 📘 In simple words: “A shim is a fallback implementation for a feature that doesn’t exist in the runtime environment.” 🧩 Example ✅ Let’s say older browsers don’t support Array.prototype.includes(). You can shim it manually like this: if (!Array.prototype.includes) { Array.prototype.includes = function (value) { return this.indexOf(value) !== -1; }; } ⚙️ Shims vs Polyfills ✅ ConceptPurposeShimAdds missing functionality by defining a method that didn’t exist before. ✅ PolyfillA more advanced shim — mimics modern API behavior to match newer ECMAScript specs. #javascript #react #interviewquestion #interviewprep #softwareengineer #frontend #developer
To view or add a comment, sign in
-
Deep JavaScript Series Have you ever seen your function run before it even exists? It's surprising, right? That’s **Hoisting** in action. JavaScript scans your file first, stores functions and variables in memory, and then runs the code. `var` appears as undefined, while `let` and `const` remain hidden in the temporal dead zone until they are declared. JavaScript doesn’t time travel; it just behaves like it does. #JavaScript #WebDev #Frontend #interview #inteviewTips
To view or add a comment, sign in
-
-
🚀 JavaScript Interview Challenge: Can you guess the output? Let’s test your understanding of Event Loop, Microtasks and Async/Await 👇 Code snippet -> console.log('1'); setTimeout(() => { console.log('2'); }, 0); Promise.resolve().then(() => { console.log('3'); }); (async function() { console.log('4'); await Promise.resolve(); console.log('5'); })(); console.log('6'); Before scrolling down, take 10 seconds and think - What do you think will be printed in the console (and in what order)? Drop your answer in the comments 👇 ⚙️ Let’s understand step-by-step: 1️⃣ console.log('1') → runs immediately (synchronous) 2️⃣ setTimeout(...) → goes to the macro task queue 3️⃣ Promise.resolve().then(...) → goes to the microtask queue 4️⃣ Inside the async IIFE: 🔹console.log('4') → runs immediately 🔹await Promise.resolve() → pauses here; the continuation (console.log('5')) goes to microtask queue 5️⃣ console.log('6') → runs next (still in sync phase) Now, the synchronous part is done. Next, the microtasks (Promises, async/await continuations) run: ➡️ '3' ➡️ '5' Finally, macro task (from setTimeout) runs: ➡️ '2' 💬 Comment below 👇 Did you get this right on your first try? Or were you surprised by where '3' and '5' appeared? If you love understanding how JavaScript actually works under the hood, follow me for more such bite-sized explanations ⚡ #JavaScript #WebDevelopment #AsyncJS #Frontend #CodingChallenge #LearnInPublic #AkshayPai #JavaScriptConsoleOutput #JavaScriptInterview #LearnJavaScript #Developer #Reactjs #Nodejs #Angular #TypeScript
To view or add a comment, sign in
-
-
𝗟𝗲𝗮𝗿𝗻𝗶𝗻𝗴 𝗥𝗲𝗮𝗰𝘁𝗝𝗦 𝗵𝗮𝘀 𝗻𝗲𝘃𝗲𝗿 𝗯𝗲𝗲𝗻 𝗲𝗮𝘀𝗶𝗲𝗿! 🚀 I’ve created handwritten notes that break down React concepts in a simple and visual way — perfect for students, beginners, or professionals gearing up for interviews. 💻 ✅ Covers React Fundamentals — Components, Props, State ✅ Includes Hooks, Lifecycle Methods, Virtual DOM ✅ Explains Context API & Redux for state management ✅ Perfect for quick revision, projects, and interview prep 🎯 Whether you’re exploring frontend development or brushing up for your next React interview, these notes will make your journey smooth and effective. 💪 📌 𝗥𝗲𝘀𝗼𝘂𝗿𝗰𝗲𝘀 𝘁𝗼 𝗔𝗰𝗰𝗲𝗹𝗲𝗿𝗮𝘁𝗲 𝗬𝗼𝘂𝗿 𝗙𝗿𝗼𝗻𝘁𝗲𝗻𝗱 𝗗𝗲𝘃𝗲𝗹𝗼𝗽𝗺𝗲𝗻𝘁 𝗝𝗼𝘂𝗿𝗻𝗲𝘆 📘 𝗖𝗮𝗿𝗲𝗲𝗿 𝗚𝘂𝗶𝗱𝗮𝗻𝗰𝗲 – 𝗙𝗿𝗼𝗻𝘁𝗲𝗻𝗱 𝗗𝗲𝘃𝗲𝗹𝗼𝗽𝗺𝗲𝗻𝘁 : https://lnkd.in/guhaEEQP 🎯 𝗕𝗼𝗼𝘀𝘁 𝗬𝗼𝘂𝗿 𝗟𝗶𝗻𝗸𝗲𝗱𝗜𝗻 𝗮𝗻𝗱 𝗡𝗮𝘂𝗸𝗿𝗶 𝗣𝗿𝗼𝗳𝗶𝗹𝗲: https://lnkd.in/gz4Uu8Ug 📕 𝗥𝗲𝘀𝘂𝗺𝗲 𝗥𝗲𝘃𝗶𝗲𝘄 𝗮𝗻𝗱 𝗢𝗽𝘁𝗶𝗺𝗶𝘇𝗮𝘁𝗶𝗼𝗻 https://lnkd.in/g3hkDm-J #React #ReactJS #Frontend #WebDevelopment #JavaScript #HandwrittenNotes #Coding
To view or add a comment, sign in
-
💡 🧠 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝗔𝗿𝗿𝗮𝘆.𝗽𝗿𝗼𝘁𝗼𝘁𝘆𝗽𝗲.𝗺𝗮𝗽() — 𝗘𝘅𝗽𝗹𝗮𝗶𝗻𝗲𝗱 + 𝗣𝗼𝗹𝘆𝗳𝗶𝗹𝗹 𝗜𝗺𝗽𝗹𝗲𝗺𝗲𝗻𝘁𝗮𝘁𝗶𝗼𝗻⚙️ Ever wondered how the map() method works behind the scenes? 👇 🔍 𝗪𝗵𝗮𝘁 𝗶𝘀 𝗺𝗮𝗽()? The map() method in JavaScript is used to transform each element of an array and return a new array — without modifying the original one. ⚡ 𝗛𝗼𝘄 𝗶𝘁 𝘄𝗼𝗿𝗸𝘀: 🧩 It takes a callback function as an argument. 🔁 Executes that function on each element of the array. 🎯 Returns a new array with the transformed results. Example 👇 const numbers = [1, 2, 3]; const doubled = numbers.map(num => num * 2); console.log(doubled); // [2, 4, 6] 💬 𝗜𝗻 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝘀 🎤 Sometimes, interviewers ask you to implement the polyfill for the map() method to test your understanding of: -> Prototype chaining 🧬 -> Callback execution 🔁 -> Return behavior 🎯 💭 Implementing polyfills helps you truly understand how built-in methods work internally — not just how to use them. If you’re preparing for a JavaScript interview, this is one of the must-practice questions 💼 ✨ 𝗪𝗵𝗮𝘁 𝗮𝗿𝗲 𝘆𝗼𝘂𝗿 𝗳𝗮𝘃𝗼𝗿𝗶𝘁𝗲 𝗽𝗼𝗹𝘆𝗳𝗶𝗹𝗹𝘀? Comment below 👇 #JavaScript #FrontendDevelopment #WebDevelopment #CodingChallenge #JavaScriptInterview #ReactJS #FrontendEngineer #100DaysOfCode #Polyfill
To view or add a comment, sign in
-
-
🚀 JavaScript Execution Context ⚡⚡ Ever wondered what happens behind the scenes when your JS code runs? 🧠 This PDF breaks down the entire execution process — from parsing and memory creation to scope chains, the this keyword, and call stacks — in the most visual and beginner-friendly way possible. 📘 What you’ll learn: ✅ How JavaScript creates and manages execution contexts ✅ The role of the Call Stack, Heap, and Lexical Environment ✅ The difference between Global and Function Execution Contexts ✅ How this changes based on function calls ✅ Common pitfalls and debugging insights 💡 Perfect for: Anyone preparing for interviews, revising JS fundamentals, or mastering the inner workings of the JS engine. 🎯 Download the PDF and strengthen your JS foundation today!👇👇 #JavaScript #FrontendDevelopment #WebDevelopment #LearningJourney #ExecutionContext #JSFundamentals #TechEducation
To view or add a comment, sign in
-
💡 𝗨𝗻𝗱𝗲𝗿𝘀𝘁𝗮𝗻𝗱𝗶𝗻𝗴 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝗣𝗿𝗼𝘁𝗼𝘁𝘆𝗽𝗲 (𝗜𝗻 𝗮 𝗪𝗮𝘆 𝗧𝗵𝗮𝘁 𝗔𝗰𝘁𝘂𝗮𝗹𝗹𝘆 𝗦𝘁𝗶𝗰𝗸𝘀) One of the most commonly asked concepts in JavaScript interviews is: 👉 “What is the Prototype in JavaScript?” And honestly… Most developers memorize the definition but never really understand it. Here’s the version that finally clicked for me 👇 🧠 1. Everything in JavaScript is linked to something else. Every object in JS has a hidden property called [[Prototype]] (you access it as __proto__) — and this connects the object to another object that acts as a backup storage. If JS can’t find a property on your object, it looks “up” the chain. ⚙️ 2. This is why your arrays can use .map() You didn’t write the map() function. But your array still has access to it because: myArray → Array.prototype → Object.prototype This chain is called prototype chaining, and that’s how JavaScript shares functions efficiently. 🧩 3. Prototype is basically JavaScript’s version of inheritance. Not like Java or C++. No classes behind the scenes (until ES6 syntactic sugar). Just plain objects linking to other objects. 📌 4. Why Interviewers Ask This Because understanding prototype helps them judge your core JS thinking: • Do you know how methods are shared? • Do you understand how classes actually work under the hood? • Do you get how the engine resolves properties? It reveals depth — not memorization. ⭐ 5. The easiest one-line explanation Prototype is the mechanism JavaScript uses for reusing methods and enabling inheritance through object links. Simple. Clean. Interview-ready. 🔥 Follow or connect Rohan Palankar for more JavaScript fundamentals, frontend interview insights, and real-world React learning content. 💬 What’s one JS concept you struggled with until it finally “clicked”?👇 #JavaScript #FrontendDeveloper #ReactJS #WebDevelopment #InterviewPreparation #FrontendRoles #DeveloperCommunity #Prototype #TechInterviews
To view or add a comment, sign in
-
-
🚀 Abstract Classes in JavaScript (Simulated) JavaScript doesn't have built-in abstract classes like some other languages, but we can simulate them. An abstract class serves as a blueprint and cannot be instantiated directly. We can enforce this by throwing an error in the constructor if someone tries to create an instance. Abstract classes are useful for defining common interfaces and behaviors for subclasses to implement. This promotes consistency and enforces a specific structure in your code. #JavaScript #WebDev #Frontend #JS #professional #career #development
To view or add a comment, sign in
-
-
Preparing for a Frontend Interview? 🚀 Here are some key topics to review: React.js: Virtual DOM vs. Real DOM ⚛️ Hooks like useState and useEffect Redux basics: Actions, Reducers, Store 🔄 CSS: Flexbox and Grid 📏 Media Queries for responsive design 📱 JavaScript: ES6 features: Let, Const, Arrow Functions ⚙️ Promises, Async/Await ⏳ Event Bubbling and Capturing 🎈 Stay sharp and best of luck! 💪 Follow for more content. #frontend #ReactJS #JavaScript #CSS #interviewprep
To view or add a comment, sign in
More from this author
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development