🚀 Node.js Interview Question #8: What is the Timers module in Node.js? The Timers module allows you to schedule code execution after a certain delay or repeatedly. Common timer functions: • "setTimeout()" → runs once after a delay • "setInterval()" → runs repeatedly after intervals • "setImmediate()" → executes after the current event loop cycle 📌 Example setTimeout(() => { console.log("Runs after 2 seconds"); }, 2000); 💡 Timers are useful for background tasks, retries, and scheduling operations. #NodeJS #BackendDevelopment #JavaScript
Node.js Timers Module: setTimeout, setInterval, setImmediate
More Relevant Posts
-
🚀 Node.js Interview Question #9: Difference between setImmediate() and setTimeout() Both are used to schedule asynchronous execution, but they run in different phases of the Event Loop. 📌 setTimeout() Executes after a specified delay. setTimeout(() => { console.log("Timeout"); }, 0); 📌 setImmediate() Executes after the current I/O operations are completed. setImmediate(() => { console.log("Immediate"); }); 💡 Key difference: "setImmediate()" runs in the check phase, while "setTimeout()" runs in the timers phase of the event loop. #NodeJS #JavaScript #BackendEngineering
To view or add a comment, sign in
-
🚀 Master React JS with Structured Notes Most developers learn React… but struggle when it comes to real-world implementation. These React JS interview notes are designed to give you clarity + practical understanding. 📘 What’s covered: ✅ React fundamentals and core concepts ✅ JSX syntax and rendering logic ✅ Functional components & lifecycle ✅ Props, state, and state management ✅ Event handling and forms 💡 Perfect for interview prep + building real projects. 📩 Comment “React” and I’ll share the notes with you. Follow Pushpendra Tripathi for more valuable content #ReactJS #FrontendDevelopment #WebDevelopment #JavaScript #Coding #Developers #Tech
To view or add a comment, sign in
-
JavaScript developers 👀 What will be the output? var obj = { name: "Guest", welcomeFn: function () { return "Hello " + this.name; } }; var obj2 = { welcomeFn: obj.welcomeFn, name: "User" }; console.log(obj2.welcomeFn()); Looks simple… but many get it wrong 👀 Drop your answer 👇 Explanation coming soon #JavaScript #FrontendDeveloper #InterviewPrep #ReactJS
To view or add a comment, sign in
-
🚀 Just shipped: Quiz Play on Ingenious React! Test your frontend engineering knowledge with 5 timed quiz packs - straight from the browser, no sign-up needed. 125 questions across: ⚛️ React & Next.js 🟨 JavaScript Core 🔷 TypeScript Essentials 🌐 Web Fundamentals 🏗️ System Design & Patterns How it works: → Pick a pack and hit Play → 25 questions · 15-minute timer → Flag tricky ones for review → Get instant results with category breakdown Built with React, Redux Toolkit, TanStack Router and the entire state persists to localStorage so you can resume mid-quiz. Perfect for interview prep, self-assessment, or just keeping your fundamentals sharp. 💪 Try it → https://lnkd.in/gTJjTRgH #React #JavaScript #TypeScript #FrontendDevelopment #WebDev #InterviewPrep #OpenSource #Chennai
To view or add a comment, sign in
-
-
🚀 **JavaScript Interview Question** What will be the output of this code? ```js const obj = { a: { b: 0 } }; const v1 = obj?.a?.b || 42; const v2 = obj?.a?.b ?? 42; console.log(v1, v2); ``` 🤔 **Think before you scroll...** --- #JavaScript #Frontend #WebDevelopment #CodingInterview #ReactJS
To view or add a comment, sign in
-
The Ultimate React JS Cheat Sheet Every Developer Needs in 2026 Struggling to remember all React concepts during interviews or while building projects? Here's a power-packed React JS Cheat Sheet that puts everything in one place from basics to advanced topics so you can code faster and smarter Mastering React becomes easier when you have the right concepts at your fingertips. Here's a quick cheat sheet to boost your productivity and quick guide will help you revise, build, and crack interviews with confidence 700 Pro Tip: Don't just read-build projects using these concepts to truly master React! Save this post & follow for more developer-friendly #ReactJS #FrontendDevelopment #JavaScript #WebDevelopment #ReactHooks #Coding #SoftwareEngineering #UIDevelopment
To view or add a comment, sign in
-
-
🚀 Day 6 – Frontend Interview Series 🔥 Topic: Promises (Async JavaScript) 💡 What is a Promise? A Promise in JavaScript is an object that represents the result of an asynchronous operation (like API calls, timers, file reading). 👉 It has 3 states: Pending ⏳ Resolved (Fulfilled) ✅ Rejected ❌ 📦 Basic Example const myPromise = new Promise((resolve, reject) => { let success = true; if (success) { resolve("Task completed!"); } else { reject("Task failed!"); } }); myPromise .then((res) => console.log(res)) .catch((err) => console.log(err)); ⚡ Why Promises? 👉 To avoid callback hell 👉 To handle async code in a clean way 👉 Better readability & chaining #JavaScript #ReactJS #FrontendDeveloper #InterviewPrep #AsyncJS
To view or add a comment, sign in
-
𝗘𝘀𝘀𝗲𝗻𝘁𝗶𝗮𝗹 𝗥𝗲𝗮𝗰𝘁𝗝𝗦 𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀 𝗳𝗼𝗿 𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝘀 React remains a core skill for modern frontend roles. Strong understanding goes beyond memorization—it’s about applying concepts effectively. 𝗞𝗲𝘆 𝗮𝗿𝗲𝗮𝘀 𝘁𝗼 𝗳𝗼𝗰𝘂𝘀 𝗼𝗻: • How React works • Component-based architecture • Virtual DOM & performance • Real-world application patterns Credit: owner Follow Alpna P. for more related content! 🤔 Having Doubts in technical journey? 🚀 Book 1:1 session with me : https://lnkd.in/gQfXYuQm 🚀 Subscribe and stay up to date: https://lnkd.in/dGE5gxTy 🚀 Get Complete React JS Interview Q&A Here: https://lnkd.in/d5Y2ku23 🚀 Get Complete JavaScript Interview Q&A Here: https://lnkd.in/d8umA-53 #ReactJS #FrontendDevelopment #WebDevelopment #JavaScript #InterviewPrep #SoftwareEngineering
To view or add a comment, sign in
-
⚛️ React Interview Question Why shouldn’t we mutate state directly in React? We write: state.user.name = "John"; setState(state); Looks fine. But UI may not update correctly. 🧠 Why? React checks reference, not deep values. If the reference doesn’t change, React thinks nothing changed. 👉Correct way setState({ ...state, user: { ...state.user, name: "John" } }); New reference → React updates. React doesn’t track changes. It tracks references. #ReactJS #FrontendDevelopment #JavaScript #ReactInterview
To view or add a comment, sign in
-
JavaScript Interview Question Q: What are the limitations of JavaScript? As frontend developers, we use JavaScript daily—but it’s important to understand its limitations too 👇 Single-threaded nature Dynamic typing Security concerns Floating-point precision issues Browser inconsistencies No true multithreading 💡 Takeaway: JavaScript is powerful, but knowing its limitations helps you write better and more reliable code. What other limitations would you add? #javascript #typescript #React #NextJS #FrontendDevelopment
To view or add a comment, sign in
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
Nice explanation 👍 Quick add — in Node.js, V8 runs your JavaScript, while libuv handles timers, I/O, and async APIs in the background. So when you call setTimeout, the waiting is managed by libuv — once the delay is done, the callback is queued back into the event loop and executed by V8. Think of it like placing an order and doing other things while waiting — Node.js works the same way.