15 Uncommon but Very Important JavaScript Questions You Shouldn’t Ignore. Most candidates prepare the “famous 20”, closures, hoisting, event loop. But in real interviews, it’s often the less obvious questions that separate good from great. Here are 15 uncommon but critical ones: 1. Explain WeakMap vs Map and why WeakMap keys must be objects. 2. What are Symbols and where would you actually use them? 3. How does the new.target meta-property work? 4. Explain Proxy and give a real-world use case. 5. How does Reflect API differ from Object methods? 6. What is BigInt and when should you use it? 7. How does Intl API (for dates, numbers, currencies) work? 8. What are Tagged Template Literals and their use cases? 9. How does requestIdleCallback differ from requestAnimationFrame? 10. Explain Atomics and SharedArrayBuffer at a high level. 11. What’s the difference between structuredClone and JSON-based cloning? 12. How does the event loop differ between browser and Node.js? 13. What are Generator functions vs Async Generators? 14. Explain import() dynamic imports and when to use them. 15. What are Transferable Objects in postMessage (Web Workers)? 𝐠𝐞𝐭 𝐞𝐛𝐨𝐨𝐤 𝐰𝐢𝐭𝐡 (detailed 232 ques = 90+ Reactjs Frequent Ques & Answers, 85+ frequently asked Javascript interview questions and answers, 25+ Output based ques & ans, 23+ Coding Questions & ans, 2 Machine coding ques & ans) 𝐄𝐛𝐨𝐨𝐤 𝐋𝐢𝐧𝐤: https://lnkd.in/gJMmH-PF Follow on Instagram : https://lnkd.in/gXTrcaKP #javascriptdeveloper #reactjs #reactjsdeveloper #angular #angulardeveloper #vuejs #vuejsdeveloper #javascript
Sai Krishna Nangunuri’s Post
More Relevant Posts
-
💡 JavaScript Array Methods Every Developer Must Know If you want to write cleaner, shorter, and more readable JavaScript code, mastering array methods is non-negotiable. Array methods not only simplify logic but also help you write functional, scalable, and interview-ready code. 🚀 Here are some essential array methods every developer should master: 🔹 Transformation & Iteration ✅ "map()" → Transform each element ✅ "forEach()" → Iterate without returning a new array ✅ "flatMap()" → Map + flatten in one step 🔹 Filtering & Searching ✅ "filter()" → Get elements based on condition ✅ "find()" → First matching element ✅ "findIndex()" → Index of matching element ✅ "some()" → Check if at least one element matches ✅ "every()" → Check if all elements match 🔹 Aggregation & Utilities ✅ "reduce()" → Powerful method for totals, grouping & complex logic ✅ "sort()" → Sort elements (numbers/strings/custom logic) ✅ "includes()" → Check if value exists ✅ "indexOf()" / "lastIndexOf()" → Find element position 🔹 Modification Methods ✅ "push()" / "pop()" → Add or remove from end ✅ "shift()" / "unshift()" → Add or remove from start ✅ "splice()" → Add/remove elements anywhere ✅ "slice()" → Copy portion of array without mutation 🔥 Why these methods matter 👉 Improve code readability 👉 Reduce loops & boilerplate logic 👉 Essential for React state updates 👉 Frequently asked in JavaScript interviews 👉 Useful in real-world data transformation As a React developer, I use these methods daily for state updates, API data transformation, and UI rendering logic. Consistency in practicing these methods can dramatically level up your problem-solving and coding confidence. 💬 Which array method do you use the most? Comment below 👇 #JavaScript #ArrayMethods #JSBasics #FrontendDevelopment #WebDevelopment #ReactJS #CodingTips #LearnInPublic
To view or add a comment, sign in
-
One of the most fundamental — yet most misunderstood — areas of JavaScript. If you don’t fully understand how functions behave under the hood, hoisting, closures, async patterns, and even React logic will feel confusing. In this post, I’ve broken down JavaScript functions from an execution-model perspective — not just syntax, but how the engine actually treats them during memory creation and runtime. Covered in this slide set: 1. Difference between Function Declarations and Function Expressions 2. How hoisting really works (definition vs undefined memory allocation) 3. Anonymous Functions and where they are actually valid 4. Named Function Expressions and their internal scope behavior 5. Parameters vs Arguments (including arity behavior in JS) 6. First-Class Functions and why functions are treated like values 7. Arrow Functions and lexical this binding Clear explanation of: 1. Why function declarations are hoisted with definition 2. Why function expressions throw “not a function” errors before assignment 3. Why anonymous functions can’t stand alone 4. How internal names in Named Function Expressions work 5. How JavaScript allows flexible argument passing 6. Why arrow functions don’t have their own this or arguments These notes are written with: 1. Interview mindset 2. Execution context clarity 3. Production-level understanding 4. Engine-level reasoning If you truly understand this topic, you automatically improve your understanding of: 1. Closures 2. Higher-Order Functions 3. Async JavaScript 4. React Hooks 5. Node.js middleware 6. Functional programming patterns Part of my JavaScript Deep Dive series — focused on building strong fundamentals, execution clarity, and real engineering-level JavaScript understanding. #JavaScript #JavaScriptFunctions #Hoisting #Closures #FirstClassFunctions #ArrowFunctions #ExecutionContext #FrontendDevelopment #BackendDevelopment #WebDevelopment #MERNStack #NextJS #NestJS #SoftwareEngineering #JavaScriptInterview #DeveloperCommunity #LearnJavaScript #alihassandevnext
To view or add a comment, sign in
-
🔹 JavaScript Hoisting — Lecture 3 | Function Hoisting vs Variable Hoisting Many developers understand variable hoisting but get confused about function hoisting. Let’s clarify it clearly 👇 ✅ Function Declaration (Fully Hoisted) greet(); function greet(){ console.log("Hello Developer"); } Output: Hello Developer ✔ Function stored completely in memory ✔ Can be called before declaration ❌ Function Expression (Not Fully Hoisted) greet(); var greet = function(){ console.log("Hello"); } Output: TypeError Why? ✔ Variable is hoisted ❌ Function is not Real MERN Project Impact Wrong understanding of hoisting causes: ❌ Undefined state values in React ❌ API execution errors ❌ Hard-to-debug production bugs Quick Summary ✔ var → hoisted with undefined ✔ let/const → hoisted but in TDZ ✔ function declaration → fully hoisted ✔ function expression → not hoisted Understanding this improves your debugging and interview performance. 🔎 Keywords: JavaScript function hoisting, JavaScript execution context, advanced JavaScript concepts, MERN stack developer #JavaScriptLearning #MERNStack #FrontendDeveloper #WebDevTips #Programming
To view or add a comment, sign in
-
-
🚨 90% of JavaScript Developers Get This Wrong (Even with 2–4 years of experience 👀) No frameworks. No async tricks. Just pure JavaScript fundamentals. 🧠 Output-Based Question (Set + Type Checking) const s = new Set(); s.add(5); console.log(s.has('5')); ❓ What will be printed? ❌ Don’t run the code 🧠 Think like the JavaScript engine A. true B. false C. error D. undefined 👇 Drop ONE option only (no explanations yet 👀) ⚠️ Why This Question Matters Most developers assume: • JavaScript auto-converts types • '5' and 5 are basically the same • Collections behave like loose equality All three assumptions can break real applications. 🎯 What This Actually Tests • How Set stores values • Strict equality (===) behavior • Primitive type comparison • Why type consistency matters in production When this mental model is unclear: • Cache checks fail • Permission checks break • Duplicate detection becomes unreliable Strong JavaScript developers don’t rely on “automatic conversion”. They understand how values are actually stored and compared. 💡 I’ll pin the breakdown after a few answers. #JavaScript #JSFundamentals #CodingInterview #WebDevelopment #FrontendDeveloper #FullStackDeveloper #DevelopersOfLinkedIn #ProgrammingTips
To view or add a comment, sign in
-
-
🔥 90% of “JavaScript Developers” Can’t Answer These Without Googling. 🔥 Last week I shared 10 essential JavaScript interview questions Can you? 👀 If you truly understand JavaScript — not just React tutorials — you should know these: 1️⃣ console.log(typeof NaN) Answer: "number" Yes… JavaScript says Not-a-Number is a number. 2️⃣ == vs === == → allows type coercion === → strict comparison (no coercion) Pro devs use ===. 3️⃣ What is a Closure? A function that remembers variables from its outer scope even after that scope is gone. This is what powers data privacy in JS. 4️⃣ What happens in the Event Loop? It checks the call stack and task queues, pushing callbacks to the stack when it’s empty. That’s how async works in a single-threaded language. 5️⃣ Shallow vs Deep Copy Shallow → copies first level only (shared references). Deep → fully independent clone. 6️⃣ console.log([] + {}) Output: "[object Object]" Because JS converts both to strings and concatenates. Wild? Yes. Logical? Also yes. 7️⃣ Why is JavaScript single-threaded? One call stack. One task at a time. Concurrency is handled via the event loop + Web APIs. 8️⃣ What is Hoisting? Declarations move to the top before execution. var → initialized as undefined let/const → temporal dead zone 9️⃣ null vs undefined undefined → declared but not assigned null → intentionally empty 🔟 Microtasks vs Macrotasks Microtasks (Promises) run before Macrotasks (setTimeout, DOM events) That’s why Promise callbacks execute first. If you knew all 10 without searching… You’re not a “framework developer.” You’re a JavaScript engineer. 💬 Comment “JS” if you got all 10. 💾 Save this for interviews. 🔁 Repost to test your network. #JavaScript #FrontendDeveloper #WebDevelopment #CodingInterview #SoftwareEngineering #100DaysOfCode
To view or add a comment, sign in
-
🚨 99% of JavaScript Developers FAIL This Question 🚨 (forEach + async = silent production bug) ❌ Looks easy ❌ Feels obvious ❌ Breaks senior interviews ❌ Causes real production bugs No frameworks. No libraries. Just JavaScript fundamentals. 🧩 Output-Based Question (forEach + async) async function test() { [1, 2, 3].forEach(async (n) => { await Promise.resolve(); console.log(n); }); console.log("done"); } test(); ❓ What will be printed to the console? ❌ Don’t run the code 🧠 Think like the JavaScript engine A. 1 2 3 done B. done 1 2 3 C. done only D. Order is unpredictable 👇 Drop ONE option only (no explanations yet 😄) ⚠️ Why this matters Most developers assume: async inside forEach is awaited Loops wait for async work to finish ❌ Both assumptions are wrong When this mental model isn’t clear: Logs appear “out of order” API calls finish after UI updates Bugs slip into production silently Strong JavaScript developers don’t guess. They understand async control flow. 💡 I’ll pin the full breakdown + correct pattern after a few answers. 🔖 Hashtags (viral-tested) #JavaScript #AsyncJavaScript #JSFundamentals #WebDevelopment #FrontendDeveloper #FullStackDeveloper #CodingInterview #DevCommunity #ProductionBugs #VibeCode
To view or add a comment, sign in
-
-
Day 24/30 – Sort an Array by Function Output in JavaScript Challange🔢 | Custom Comparator 📌 Problem Given: An array arr A function fn Return a new array sortedArr sorted in ascending order based on the value returned by fn(arr[i]). You can assume: fn always returns a number Sorting must be based on fn output 🧠 Example arr = [5, 4, 1, 2, 3] fn = (x) => x * x Since squares are: 25, 16, 1, 4, 9 Sorted by square value: [1, 2, 3, 4, 5] 💡 JavaScript Solution var sortBy = function(arr, fn) { return arr.slice().sort((a, b) => fn(a) - fn(b)); }; 🔎 Why This Works sort() accepts a comparator fn(a) - fn(b) ensures ascending order slice() prevents mutation of the original array Time Complexity: O(n log n) Space Complexity: O(n) (due to copy) ⚡ Real-World Use Cases Sorting users by age Sorting products by price Ranking students by score Sorting tasks by priority 🧠 Interview Insight This pattern is called “sort by projection”: You don’t sort by the element itself — You sort by a derived value. That’s a powerful abstraction concept. #JavaScript #30DaysOfJavaScript #CodingChallenge #JSLogic #ArrayMethods #WebDevelopment #FrontendDevelopment #LearnToCode #CodeEveryday #Programming #DeveloperJourney #TechCommunity #InterviewPrep #LeetCode #AsyncJavaScript #SoftwareEngineering #100DaysOfCode #BuildInPublic Custom comparator JavaScript Sort array by derived value JS JavaScript array sort interview question Higher order functions JavaScript JavaScript sorting techniques JS sort with callback Advanced JavaScript array methods JavaScript coding challenge solution Frontend interview preparation
To view or add a comment, sign in
-
-
One JavaScript method that looks complex at first but completely changes how you solve problems once it clicks: Array.prototype.reduce() When most developers start out, they rely heavily on map, filter, or multiple loops. That works — but it often leads to extra iterations, more variables, and more lines of code. reduce feels intimidating initially because it’s more abstract. But once you truly understand it, you start seeing patterns everywhere — grouping, aggregations, transformations — all solved in a single pass. This is one of those skills that actually differentiates candidates in interviews. Writing expressive, efficient logic using reduce shows strong problem-solving and a deep understanding of JavaScript. Example: grouping data (a common “complex” interview problem const users = [ { name: "A", role: "admin" }, { name: "B", role: "user" }, { name: "C", role: "admin" } ]; const groupedByRole = users.reduce((acc, user) => { (acc[user.role] ??= []).push(user); return acc; }, {}); ) That’s it. With traditional approaches, this often turns into multiple loops, conditionals, or temporary variables. With reduce, the intent is clear: take an array and reduce it into a grouped object. Recently, I’ve started consciously reaching for reduce wherever it fits — and it has made my code more readable, more functional, and more efficient. If reduce still feels confusing, that’s normal. Stick with it. Once it clicks, your JavaScript problem-solving level jumps noticeably. #javascript #typescript #reactjs #nextjs #frontend #webdevelopment #coding #softwareengineering
To view or add a comment, sign in
-
🚀 Day 2: JSX - It’s NOT HTML Stop calling it "HTML inside JS." 🛑 One of the biggest hurdles for beginners (and a common slip-up for pros) is treating JSX like standard HTML. In 2026, with sophisticated build tools and the React Compiler, it’s even more important to understand what’s actually happening under the hood. The Concept: JSX is a Syntax Extension JSX is essentially "syntactic sugar." You aren't writing markup; you are writing function calls that describe what the UI should look like. When your code runs, a transpiler (like Babel or SWC) converts your "tags" into plain JavaScript objects. * JSX: <h1>Hello World</h1> * JavaScript: React.createElement('h1', null, 'Hello World') Interview Q: "Why can’t we use 'class' or 'for' attributes in JSX?" The Pro Answer: "Because JSX is ultimately JavaScript, and class and for are reserved keywords in the JS language. To avoid syntax conflicts, React uses camelCase properties: className instead of class, and htmlFor instead of for. This reminds us that we are manipulating the DOM through a JavaScript API, not writing a static file." 🔥 The Great Debate: Some frameworks (like Vue or Angular) use standard HTML templates with special directives. React sticks to "Everything is JS." Do you prefer the power of JSX, or do you wish we used standard HTML templates? Let’s discuss below! 👇 #ReactJS #JSX #WebDevelopment #CodingTips #100DaysOfCode #FrontendEng
To view or add a comment, sign in
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