🧠 TypedArray = Bridge between JavaScript Memory and Real World I’ve been exploring how binary data moves: 👉 From memory 👉 Through TypedArrays 👉 Into Buffers 👉 And finally over the network 🔹 What I practiced Created an ArrayBuffer Attached a Uint8Array (TypedArray) Filled it with ASCII values Sent the same memory directly in an HTTP response No strings. No JSON. Pure bytes. 🔹 Why TypedArrays matter TypedArrays decide how bytes are interpreted: Uint8Array → unsigned bytes Int16Array → signed 16-bit integers Float32Array → floating numbers They turn raw memory into meaningful data. 🔹 Memory → Disk → Network (Same Concept) The same ArrayBuffer can be: ✅ Written to a file ✅ Sent over HTTP ✅ Stored in a database ✅ Processed in WebAssembly Without changing the underlying memory. 🔹 Important insight Node.js Buffer is built on top of ArrayBuffer + TypedArray. So when you understand TypedArrays, you understand how Node.js handles binary data internally. 🔑 One-Line Takeaway TypedArrays are the highway that moves bytes between memory, disk, and network. If this kind of low-level JS excites you, 👍 like or 💬 comment More JavaScript internals & experiments coming soon 🚀 #JavaScript #TypedArray #ArrayBuffer #NodeJS #JSInternals #BinaryData #WebDevelopment #BackendDevelopment #LearningInPublic #DeveloperCommunity
Understanding TypedArrays in JavaScript: Binary Data Bridge
More Relevant Posts
-
JSON VS JS OBJECT ........ 1️⃣ JSON is a string format; Object is a native JS data structure. 2️⃣ JSON keys must be double-quoted; Object keys can be unquoted if valid identifiers. 3️⃣ JSON values are limited to string, number, boolean, null, array, object; Object can store anything, including functions and undefined. 4️⃣ JSON cannot have functions or undefined; Object can. 5️⃣ JSON is used for data exchange and storage; Object is used for in-memory code logic. 6️⃣ JSON needs serialization (JSON.stringify) and parsing (JSON.parse); Object doesn’t. 7️⃣ JSON is language-independent and interoperable; Object is JS-specific. #React #ReactJS #ReactDeveloper #FrontendDevelopment #JavaScript #WebDevelopment #FrontendEngineer #UIEngineering #ComponentBased #Hooks #NextJS #SinglePageApplications #WebApps #SoftwareEngineering #CleanCode #DevCommunity #BuildInPublic #Coding #TechCareers #DeveloperLife #Javascript
To view or add a comment, sign in
-
-
Today I explored one of the most powerful and widely used concepts in JavaScript: Higher-Order Functions, along with the map, filter, and reduce array methods. Understanding higher-order functions helped me see how functions in JavaScript can be passed as arguments, returned from other functions, and used to write cleaner, more expressive code. The map, filter, and reduce methods showed how complex data transformations can be handled in a functional and readable way. What I learned: How higher-order functions enable reusable and composable logic Using map() to transform data without mutating the original array Using filter() to extract specific data based on conditions Using reduce() to accumulate values and solve complex problems in a single pass 💡 Key takeaway: These methods shift the focus from how to loop to what to compute, making code more declarative, readable, and maintainable. This session strengthened my ability to work with data efficiently and write cleaner JavaScript that scales well in real-world applications. #JavaScript #HigherOrderFunctions #MapFilterReduce #FunctionalProgramming #WebDevelopment #LearningJourney
To view or add a comment, sign in
-
𝗧𝗵𝗲 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻 𝘁𝗵𝗮𝘁 𝗡𝗲𝘃𝗲𝗿 𝗙𝗼𝗿𝗴𝗲𝘁𝘀: 𝗠𝗮𝘀𝘁𝗲𝗿𝗶𝗻𝗴 𝗖𝗹𝗼𝘀𝘂𝗿𝗲𝘀 🧠 Hi everyone! I’ve just released Part 5 of my JavaScript deep-dive series: 𝗧𝗵𝗲 𝗠𝗲𝗰𝗵𝗮𝗻𝗶𝗰𝘀 𝗼𝗳 𝗖𝗹𝗼𝘀𝘂𝗿𝗲𝘀. Closures are often treated like a "magic trick" in JavaScript interviews, but they are actually a logical result of how the engine links scopes together. If you’ve ever struggled with why a setTimeout in a loop logs the "wrong" number, or how "private" variables actually work in a language without a private keyword, this article is for you. 𝗜𝗻 𝘁𝗵𝗶𝘀 𝗽𝗮𝗿𝘁, 𝗜 𝗱𝗶𝘃𝗲 𝗶𝗻𝘁𝗼: • 𝗧𝗵𝗲 𝗜𝗻𝘁𝗲𝗿𝗻𝗮𝗹 𝗦𝗹𝗼𝘁𝘀: Meet [[Environment]] and [[OuterEnv]], the two hidden connectors that make closures possible. • 𝗩𝗮𝗿𝗶𝗮𝗯𝗹𝗲𝘀 𝘃𝘀. 𝗩𝗮𝗹𝘂𝗲𝘀: Why closures link to "live" variables (and why that leads to the famous loop trap). • 𝗧𝗵𝗲 𝗜𝗜𝗙𝗘 𝘃𝘀. 𝗟𝗲𝘁: How we used to fix closures in the old days vs. the modern ES6 solution. • 𝗘𝗻𝗰𝗮𝗽𝘀𝘂𝗹𝗮𝘁𝗶𝗼𝗻: How to use closures to create "vaults" for your data. Stop guessing how your functions remember data and start understanding the architecture behind it! Read the full article here: https://lnkd.in/dR_TngGA 🔗 𝗡𝗲𝘅𝘁 𝘂𝗽: We tackle the "Grand Design" of JavaScript objects, 𝗣𝗿𝗼𝘁𝗼𝘁𝘆𝗽𝗲𝘀. #JavaScript #SoftwareEngineering #WebDevelopment #Coding #Closures #ProgrammingTips #TechCommunity #ScopeChain
To view or add a comment, sign in
-
🚀 Full Stack Journey Day 69: Mastering JavaScript’s Primitive Data Types! 🧬✨ Day 69 of my #FullStackDevelopment series! Today, I’m digging into the core "atoms" of JavaScript: Primitive Data Types. 🏗️ In JavaScript, primitives are the simplest forms of data. They are immutable (cannot be changed) and are the building blocks for everything else we build. Here’s the breakdown of the Big 5 I covered today: String: Used for text. Whether it’s "Hello" or 'Day 69', strings are essential for displaying information to users. ✍️ Number: Unlike some languages that have integers and floats separately, JS uses a single Number type for everything—whole numbers and decimals alike! 🔢 Boolean: The logic gate. It only has two values: true or false. This is the backbone of every "if" statement and decision in our code. ✅❌ Null: This represents an intentional absence of any value. It’s like a box that is explicitly labeled "empty." 📦🕳️ Undefined: This happens when a variable has been declared but hasn't been assigned a value yet. It’s the browser saying, "I know this exists, but I don't know what's in it yet!" ❓ Understanding these basics is critical because they dictate how JavaScript compares values and manages memory. 📂 Access my detailed notes here: 👉 GitHub: https://lnkd.in/g8p9emJV #JavaScript #WebDevelopment #Frontend #DataTypes #FullStackDeveloper #CodingJourney #SoftwareEngineering #TechLearning #Day69 #Programming LinkedIn Samruddhi Patil
To view or add a comment, sign in
-
-
🚀 JavaScript Data Types JavaScript works with different types of data. Understanding them clearly is important for writing better code. Here are the main types shown: 🔹 String – Text inside quotes 🔹 Number – Integers or decimal values 🔹 Boolean – true or false 🔹 Undefined – Variable declared but no value assigned 🔹 Null – Intentionally empty value 🔹 Array – Collection of multiple values JavaScript provides a built-in way to check the type of any value, which helps in debugging and writing cleaner logic. Clear basics lead to confident coding. #javascript #webdevelopment #frontenddeveloper #coding #learninginpublic #100DaysOfCode
To view or add a comment, sign in
-
-
✨ 𝗗𝗮𝘆 𝟳 𝗼𝗳 𝗠𝘆 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝗝𝗼𝘂𝗿𝗻𝗲𝘆 🚀 Today I took a deep dive into 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝗔𝗿𝗿𝗮𝘆𝘀, and it was fascinating to uncover how they really work under the hood. At first glance, arrays seem like a standard data structure, but in JavaScript, they are actually special types of objects. This means: • They have numbered indices like arrays, but they’re technically keys on an object • They come with powerful built-in methods like push(), pop(), map(), filter(), reduce() • Their “length” property updates dynamically based on the highest index Learning this helps me understand why arrays in JS behave differently from arrays in other languages, and why knowing the inner workings is crucial for writing efficient and bug-free code. Every day, as I explore deeper, I realize that mastering the fundamentals is what builds a solid foundation as a developer. Step by step, my understanding of JavaScript is getting stronger and more confident! 💪 #JavaScript #100DaysOfCode #WebDevelopment #LearningJourney #FrontendDevelopment #CodingFundamentals
To view or add a comment, sign in
-
-
🚀 Day -1: Deep Dive into JavaScript Data Types Today I revised one of the most important JavaScript fundamentals — Primitive vs Non-Primitive Data Types. Understanding this clearly helps a lot in interviews, debugging, and writing efficient code. 🔹 Primitive Data Types Number, String, Boolean Undefined, Null BigInt, Symbol ✅ Key Points Immutable (values cannot be changed) Stored in Stack Memory Passed by value Example: Changing one variable does not affect another because each has its own copy. 🔹 Non-Primitive (Reference) Data Types Object Array Function ✅ Key Points Mutable (values can be modified) Stored in Heap Memory Passed by reference Example: Updating one object can affect another variable pointing to the same reference. 💡 This concept explains many real-world JavaScript issues like: Unexpected object changes Shallow vs deep copy Why const objects can still change 📌 Consistency + Fundamentals = Strong Developer Foundation #JavaScript #WebDevelopment #Programming #LearningJourney #Frontend #SoftwareEngineering #DSA #GATECSE
To view or add a comment, sign in
-
Wrote a new blog post: "Extracting Data from SPAs: When BeautifulSoup Isn't Enough" You view-source on a page and see nothing but <div id="root"></div>. The data is there, it's just rendered by JavaScript. But here's what most people miss: you almost never need a headless browser. The post walks through a 5-step escalation ladder: 1. Find the hidden API (check Network tab, works 80% of the time) 2. Intercept responses at the network level with Playwright 3. Block unnecessary resources to speed up browser scraping 2-5x 4. Render JS server-side, then parse with BeautifulSoup 5. Reverse engineer the JavaScript when nothing else scales Plus a few tricks most tutorials skip: __NEXT_DATA__ extraction for Next.js apps, GraphQL endpoint discovery, and WebSocket interception. The goal is always the simplest approach that works. Start with HTTP, escalate to browser only when necessary. Full post: https://lnkd.in/d5d_FJ_9 #WebScraping #Python #ReverseEngineering #SoftwareEngineering #DataExtraction
To view or add a comment, sign in
-
🧠 99% of JavaScript developers answer this too fast — and get it wrong 👀 (Even with 2–5+ years of experience) ❌ No frameworks ❌ No libraries ❌ No async tricks Just pure JavaScript fundamentals. 🧩 Output-Based Question (Objects & References) const a = { x: 1 }; const b = a; b.x = 2; console.log(a.x); ❓ What will be printed? ❌ Don’t run the code 🧠 Think like the JavaScript engine A. 1 B. 2 C. undefined D. Throws an error 👇 Drop ONE option only (no explanations yet 😄) 🤔 Why this matters Most developers assume: const makes data immutable assigning creates a copy objects behave like primitives All three assumptions are dangerous. This question tests: • reference vs value • memory behavior • how objects are stored • what const actually protects When fundamentals aren’t clear: state mutates unexpectedly React bugs appear out of nowhere data leaks across components debugging becomes guesswork Strong JavaScript developers don’t just write code. They understand what lives in memory. 💡 I’ll pin the explanation after a few answers. #JavaScript #JSFundamentals #WebDevelopment #FrontendDeveloper #FullStackDeveloper #CodingInterview #DevCommunity #ProgrammingTips #LearnJavaScript #SoftwareEngineering
To view or add a comment, sign in
-
-
🔥 𝐓𝐡𝐞 𝐒𝐞𝐜𝐫𝐞𝐭 𝐋𝐢𝐟𝐞 𝐨𝐟 𝐉𝐚𝐯𝐚𝐒𝐜𝐫𝐢𝐩𝐭 — 𝐖𝐡𝐚𝐭 .𝐜𝐥𝐨𝐧𝐞() 𝐑𝐞𝐚𝐥𝐥𝐲 𝐌𝐞𝐚𝐧𝐬🤯 Most devs know how to copy data in JS. But few realize how each method behaves under the hood. Understanding this can save performance, prevent bugs, and improve clarity. There’s more to cloning than just “duplicate this object.” Here’s what you should know: • 📌 Reference vs Value — Not everything actually copies • 🧠 Shallow clone — Copies top level, not nested objects • 🪄 Deep clone — Copies whole structure • ✨ Spread operator (...) — Short but shallow • 🧱 Object.assign() — Also shallow • 🔁 JSON.parse(JSON.stringify()) — Deepish, but loses functions • 🌪️ StructuredClone — True deep clone with edge-case safety • 🧩 Lodash/utility clone — library tools that avoid common traps ➡️ Shallow clone without knowing deeper references leads to side effects. ➡️ JSON.parse loses types, dates, undefined, functions — beware. ➡️ Modern structured clone is the safest way for true deep copies. Knowing how to clone right improves code clarity and eliminates side effects that hide like ghosts. 👇 What’s your go-to way to clone complex objects in JS? #JavaScript #WebDevelopment #CodingWisdom #DeveloperLife #Frontend #SoftwareEngineering #Programming #CleanCode #Performance #JS2026 #TechTips #DevCommunity
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