Diving Deep into JavaScript Internals | Learning from Rohit Bhaiya I’ve been consistently learning JavaScript from Rohit Negi, and recently I explored some powerful internal concepts that completely changed the way I understand JS. Here’s what I studied: 🔹 Variables & Data Types Difference between let and const Hoisting behavior and the Temporal Dead Zone (TDZ) Primitive vs Non-Primitive data types Why typeof null === "object" (legacy behavior) BigInt and Number limits 🔹 Primitive vs Non-Primitive Primitives are immutable Objects/Arrays/Functions are mutable Understanding reference copying vs value copying 🔹 Memory Management in JavaScript Stack vs Heap memory How primitives are stored in Stack How objects are stored in Heap with references in Stack Byte addressable memory concept Base address + index * size formula 🔹 Garbage Collection How JavaScript automatically frees unused memory Why understanding memory helps in writing optimized code 🔹 Engine-Level Concepts Pointer tagging trick How booleans, null, undefined are internally optimized How 32-bit / 64-bit addressing works This learning helped me move beyond just writing code and start understanding how JavaScript actually works behind the scenes. #JavaScript #WebDevelopment #Programming #Learning #DSA #Frontend #CodingJourney Rohit Negi
JavaScript Internals with Rohit Negi: Variables, Memory, and Garbage Collection
More Relevant Posts
-
🚀 JavaScript Learning Update - Day 20 Today, I focused on revising the core concepts I’ve learned so far in JavaScript. I revised: • Objects and object methods • Shallow copy vs Deep copy • Array methods and their polyfills (map, filter, forEach) • Classes and Constructors • Encapsulation and Abstraction • Inheritance in JavaScript Instead of learning something new, I strengthened my fundamentals by reviewing concepts and clearing small doubts. Revision helps turn information into understanding. Strong fundamentals > Fast learning. Consistent practice. Continuous improvement. #JavaScript #WebDevelopment #OOP #LearningInPublic #DeveloperJourney #FrontendDeveloper
To view or add a comment, sign in
-
🚀 JavaScript Learning Update – Day 17 Today, I studied two important OOP concepts in JavaScript: Encapsulation and Abstraction. I explored: • How encapsulation protects and organizes data inside a class • How abstraction hides internal implementation details • Why these concepts are important in real-world applications Along with this, I wrote a detailed blog on: “What Really Happens Behind the Scenes in a JavaScript Class” Instead of just learning syntax, I focused on understanding: • How the class keyword works internally • How constructors are connected • How JavaScript manages methods and objects under the hood Understanding the “why” behind the code makes learning much stronger. Building deep fundamentals, step by step. #JavaScript #OOP #WebDevelopment #LearningInPublic #FrontendDeveloper #DeveloperJourney
To view or add a comment, sign in
-
Understanding JavaScript Objects — The Heart of JavaScript When learning JavaScript, one concept that appears everywhere is Objects. They are the backbone of how data is structured and managed in modern JavaScript applications. In this visual guide, I summarized some core concepts of JavaScript Objects: 🔹 Object structure using {} 🔹 Keys and Values relationships 🔹 Methods inside objects 🔹 Nested objects (objects inside objects) 🔹 Arrays inside objects 🔹 Adding new properties at runtime 🔹 Reassigning values dynamically Understanding these concepts is essential because objects power almost everything in JavaScript — from APIs to UI state management. This poster is designed as a quick visual reference for developers and learners who want to strengthen their JavaScript fundamentals. If you're learning JavaScript, mastering objects will make many advanced concepts much easier to understand. 💡 What concept in JavaScript took you the longest to understand? Let’s discuss in the comments. Ashfaq Ahmed Waraich AI Prompt Engineer | Helping Businesses Communicate Better with AI #javascript #webdevelopment #frontenddevelopment #coding #programming #developers #learnjavascript #techlearning #100DaysOfCode #softwaredevelopment
To view or add a comment, sign in
-
-
New Article Alert for JavaScript Learners! I just published a comprehensive guide on JavaScript Operators — Complete Guide for Beginners to Advanced (With Examples) on Medium. Whether you’re starting or leveling up your JS skills, this article breaks down essential concepts with clear explanations and practical examples. 🔍 What you’ll learn: ✨ What operators are and why they matter in JavaScript 🔢 All major operator types — from arithmetic and comparison to logical, bitwise, ternary, and more 📊 Operator precedence explained so your expressions behave exactly as expected 💡 Common beginner mistakes (and how to avoid them) 👨💻 Real-world code examples + interview practice questions Whether you’re preparing for interviews or enhancing your core JavaScript fundamentals, this guide has something valuable for you. 📖 Read the full article: https://lnkd.in/gPahbxvG #JavaScript #WebDevelopment #Coding #Programming #Beginners #TechCommunity
To view or add a comment, sign in
-
I used to confuse ... in JavaScript all the time. Until I realized it’s doing two completely opposite things. That’s when everything finally clicked. When I started learning JavaScript, I saw this everywhere: ... And I thought: “Okay… same operator, same job.” Wrong. Here’s the truth 👇 The same syntax has two different roles: → Spread = expands data → Rest = collects data 💡 Think of it like this: • Spread → unpacks • Rest → packsat small mental shift changed how I write JavaScript. No more confusion. Just clarity. If you're learning JS right now, remember this: 👉 Don’t memorize syntax 👉 Understand behavior That’s what actually sticks. I found this visual guide super helpful 👇 What’s one JavaScript concept that confused you at first but makes sense now? 💬 Hitesh Choudhary | Piyush Garg | Akash Kadlag | Suraj Kumar Jha | Shubham Waje | Jay Kadlag #chaicode #JavaScript #WebDevelopment #CodingJourney #LearnToCode #Developers #Programming #100DaysOfCode #TechLearning
To view or add a comment, sign in
-
-
🚀 JavaScript Learning Update — Memory Management in JavaScript Today I explored how memory management works in JavaScript and created a flowchart (attached) to summarize my understanding. Key takeaways: • Memory works through addresses — the runtime maps values to memory locations so they can be accessed, updated, or removed. • Conceptually, runtime memory is divided into Stack and Heap. The Stack stores call frames and short-lived local variables and is very fast. The Heap stores dynamically allocated data such as objects, arrays, and strings, and is managed by the JavaScript engine. • JavaScript distinguishes between primitive values and reference types. Primitive values are immutable and copied by value, while objects and arrays are stored in the heap and accessed through references. • JavaScript engines represent values using efficient internal techniques such as tagged pointers or NaN-boxing. For example, small integers can sometimes be stored directly in stack as immediate values (SMIs), while larger values are stored in the heap. • JavaScript also uses automatic garbage collection, which frees memory that is no longer reachable from the program. • Implementation detail: 32-bit and 64-bit systems handle memory differently. Modern engines use techniques like pointer compression on 64-bit systems to improve memory efficiency. Why this matters? Understanding these internals helps developers reason about performance, memory usage, and potential memory leaks in real-world applications. 📎 I attached a flowchart summarizing the full concept. Course Instructor: @RohitNegi | YouTube Channel: Coder Army #JavaScript #V8 #MemoryManagement #FrontendEngineering #LearningInPublic #BuildInPublic #FullStackDevelopment
To view or add a comment, sign in
-
-
I used to think JavaScript's "Single-Threaded" nature was a limitation. Then I went to an Engineering Exam. 📝 Most tutorials explain Promises using boring "Pizza Ordering" analogies. I decided to write something for the students who pull all-nighters. In my latest blog, I break down: ✅ The Dark Ages: Why Callback Hell is like a failing cheating chain. ✅ The Pact: How Promises solve "Inversion of Control." ✅ The Engine Room: Meet the "Hall Peon" (Event Loop) and the "Focused Desk" (Call Stack). ✅ The Tactics: When to use Promise.all vs Promise.race during placement season. If you’ve ever struggled to visualize how the Event Loop actually works while the Browser handles the multitasking, this one is for you. Read the full story here: https://lnkd.in/d7A_g-2P #JavaScript #WebDevelopment #Programming #SoftwareEngineering #Hashnode #Promises #EventLoop #CodingTips
To view or add a comment, sign in
-
Most beginners don’t struggle with JavaScript logic first. They struggle with error messages. So I built something small but practical: Explain-Error CLI — a Node.js tool that converts confusing JavaScript errors into simple, beginner-friendly explanations. Instead of: TypeError: Cannot read properties of undefined It explains: You’re trying to access something on a variable that doesn’t exist yet. Make sure it has a value before using it. I built this during the GitHub Copilot CLI Challenge to explore one thing: Can AI meaningfully improve development speed inside the terminal? Using GitHub Copilot CLI, I: - Generated structured error pattern detection - Refined regex logic - Improved CLI output formatting - Iterated faster without breaking flow It felt like focused pair programming, entirely in the command line. Small project. Real impact for beginners. If you mentor students or teach JavaScript - what’s the most confusing error they face? #JavaScript #NodeJS #GitHubCopilot #DeveloperExperience #BuildInPublic #AI
To view or add a comment, sign in
-
-
🚀 JavaScript Learning Series – Understanding Some Basic Terms First Before we start learning JavaScript, it’s important to understand a few basic programming terms. These terms will help us better understand how JavaScript works. 1️⃣ What is a High-Level Language? A high-level language is a programming language that is easy for humans to read and write. It uses simple and understandable syntax compared to low-level languages like machine code. Examples: JavaScript, Python, Java. 2️⃣ What is an Object-Oriented Programming Language? Object-Oriented Programming (OOP) is a way of writing programs using objects. Objects contain data and functions together. For example, a Car object can have: • properties → color, model • methods → start(), stop() 3️⃣ What is an Interpreted Language? An interpreted language runs code line by line instead of compiling the entire program before execution. JavaScript is interpreted by the JavaScript engine inside the browser. 4️⃣ What is a Synchronous Language? Synchronous execution means code runs one step at a time in order. The next line of code runs only after the previous line finishes. Example: console.log("Step 1") console.log("Step 2") console.log("Step 3") Output: Step 1 Step 2 Step 3 Each line waits for the previous one to complete. 5️⃣ What is a Single-Threaded Language? JavaScript is single-threaded, which means it can execute one task at a time. It has only one call stack to process code. Even though JavaScript is single-threaded, it can still handle asynchronous operations using mechanisms like the event loop (which we will learn later). 💡 Understanding these concepts will make it easier to learn how JavaScript works internally. 📌 In the next post, we’ll finally answer the main question: What exactly is JavaScript and why do we need it? ❓ Quick question: Do you think JavaScript is an interpreted language or a compiled language? Share your answer in the comments. #JavaScript #Programming #WebDevelopment #FrontendDevelopment #LearnToCode
To view or add a comment, sign in
-
📣 𝗡𝗲𝘅𝘁 𝗕𝗹𝗼𝗴 𝗶𝘀 𝗛𝗲𝗿𝗲! ⤵️ Understanding Variables and Data Types in JavaScript 📦🧠 When you start coding, variables feel small. But they quietly power everything in programming. This blog explains variables and data types the way beginners actually understand them — through simple mental models and real practice. 🔗 𝗥𝗲𝗮𝗱 𝗵𝗲𝗿𝗲: https://lnkd.in/d8H2ZiCU 𝗧𝗼𝗽𝗶𝗰𝘀 𝗰𝗼𝘃𝗲𝗿𝗲𝗱 ✍🏻: ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺ ⇢ Why variables actually exist in real programs ⇢ Variables as labeled boxes (simple mental model) ⇢ var, let, and const — when to use what ⇢ Mutable vs immutable values ⇢ JavaScript data types explained simply ⇢ String, Number, Boolean, Undefined, and Null ⇢ Scope visualized like rooms in a house ⇢ Small practice examples to build confidence ⇢ Why mastering variables makes future topics easier 💬 If JavaScript feels confusing at the start, this article helps you build a strong foundation with variables and data types. #ChaiAurCode #JavaScript #Variables #ProgrammingBasics #WebDevelopment #Beginners #LearningInPublic #100DaysOfCoding
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