Day 23 – JavaScript 🚀 Shallow Copy vs Deep Copy Understanding how data is copied in JavaScript is important to avoid unexpected bugs, especially when working with objects and arrays. In this post, I’ve covered: • What is a shallow copy • What is a deep copy • Differences between shallow and deep copy • Common methods like spread operator, Object.assign, and JSON methods 📌 Day 23 of my JavaScript learning series. #JavaScript #WebDevelopment #FrontendDevelopment #BackendDevelopment #LearningInPublic #100DaysOfCode #JavaScriptBasics #Developers #CodingJourney
JavaScript Shallow vs Deep Copy Explained
More Relevant Posts
-
💡 JavaScript Array Methods Every Developer Should Know. Arrays are one of the most used data structures in JavaScript. Mastering array methods can make your code cleaner and more powerful. Important methods every developer should know: ✔️ map() – Transform each element ✔️ filter() – Select elements based on conditions ✔️ reduce() – Convert array to single value ✔️ find() – Get first matching element ✔️ some() / every() – Condition checks. Learning these methods improves problem solving and coding efficiency. #JavaScript #WebDevelopment #FrontendDeveloper #Coding
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
-
-
🚀 JavaScript Learning – String Methods Today I practiced some important string methods in JavaScript. Strings look simple, but the built-in methods make them powerful. Here are a few I worked on: let text = "javascript learning"; console.log(text.toUpperCase()); // JAVASCRIPT LEARNING console.log(text.slice(0, 10)); // javascript console.log(text.replace("learning", "practice")); console.log(text.includes("script")); // true console.log(text.length); // string length These methods help in formatting text, validating input, and manipulating data efficiently. Small improvements in handling strings can make applications much cleaner and more dynamic 💻🔥 #JavaScript #FrontendDevelopment #WebDevelopment #CodingJourney
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 learnt the basics of JavaScript No frameworks. No advanced topics. Just the basics. I spent time understanding variables, data types, and functions :the true building blocks of JavaScript. Understanding data types reminded me that every value matters whether it’s a string, number, or boolean and mixing them carelessly can lead to unexpected results. Functions showed me the power of reusability. Instead of repeating code, you can structure your logic once and use it whenever you need it. What stood out to me today is this:Programming isn’t about memorizing code. It’s about understanding how things work. It’s about thinking step by step. It’s about writing instructions clearly enough for a computer to follow. And honestly, that’s a mindset shift. This journey is not about rushing to advanced concepts. It’s about building a strong foundation that I can confidently grow from. #30DaysOfTech #JavaScript #LearningInPublic #BuildInPublic #TechJourney #LearningWithTS #TSAcademy
To view or add a comment, sign in
-
-
Over past week, I’ve been diving deeper into JavaScript fundamentals and I decided to practice everything together in one big script to truly test my understanding. So far, I’ve worked through: • Variables (let, const) • Data types & typeof • Mathematical, assignment & comparison operators • Operator precedence • Template literals • If/else statements • Type conversion vs type coercion • Strict (===) vs loose (==) equality • Basic user input handling Instead of just watching tutorials, I combined multiple lessons into one large practice file to see how everything connects. That exercise alone helped me understand how JavaScript actually behaves especially with tricky coercion cases like: '23' - '10' - 3 Learning JavaScript is less about memorizing syntax and more about understanding how the engine thinks. Still building. Still refining. #JavaScript #WebDevelopment #Frontend #LearningInPublic
To view or add a comment, sign in
-
Mastering the Two Sum Algorithm in JavaScript (O(n) solution) Today I implemented the classic Two Sum problem using an optimized approach with Map in JavaScript. Instead of using the naive O(n²) double loop, I used a hash map to reduce the time complexity to O(n). Here is the core idea: 🔍 Why this approach is powerful Single loop → O(n) time complexity Constant-time lookup using a hash map Clean and scalable logic Interview-ready solution I'm currently strengthening my problem-solving and algorithmic thinking skills daily. You can find the full exercises repository here: 👉 https://lnkd.in/ej4fNeZs Consistency > Motivation. Small improvements every day compound over time. #JavaScript #Algorithms #ProblemSolving #WebDevelopment #100DaysOfCode #SoftwareEngineering
To view or add a comment, sign in
-
-
Just Created a JavaScript Cheat Sheet (2025 Edition) If you're learning JavaScript or revising core concepts, this covers everything you need: ✅ Variables & Data Types ✅ Functions, Loops & Control Flow ✅ Arrays & Objects ✅ ES6+ Features (Arrow Functions, Destructuring, Spread) ✅ Promises, Async/Await & Error Handling ✅ OOP, Set & Map, JSON & More Whether you're a beginner or preparing for interviews, mastering these fundamentals is the key to becoming a strong developer. Consistency + Practice = JavaScript Mastery 💻✨ #JavaScript #WebDevelopment #FrontendDeveloper #Coding #100DaysOfCode #LearnToCode
To view or add a comment, sign in
-
I’ve stopped just learning syntax and started understanding the logic behind JavaScript. This week, I focused only on core fundamentals. No frameworks. No shortcuts. Just pure JavaScript practice to make my base stronger. It’s easy to watch tutorials. It’s different when you solve problems on your own and truly understand why the code works. Here is what my practice session looked like today: ✅ Deep Dive into Types: Cleared up the confusion between Primitive vs. Non-Primitive types and finally mastered the difference between Null vs. Undefined. ✅ Logic & Comparison: Practiced Truthy vs. Falsy values and why I should almost always prefer Triple Equal (===) over Double Equal (==) to avoid weird bugs. ✅ Scoping & Hoisting: Got my head around Global, Local, and Block scope. Understanding Hoisting and Closures felt like unlocking a secret level in JS—it makes debugging so much easier! ✅ Functional Power: Spent time with Callback functions and high-order methods like Map, Filter, Find, and Reduce. Seeing how Reduce can transform an entire array into a single value. ✅ Memory & Reference: Learned how JavaScript handles Pass by Value vs. Pass by Reference. This is huge for avoiding accidental data mutations in objects and arrays. ✅ The Little Things: Refined my use of Increment/Decrement operators and how to write cleaner loops using forEach. What I realized from this journey is simple; Strong fundamentals make advanced topics easier. Now when I write code, I feel more confident. I don’t just copy solutions — I understand them. Step by step, building my foundation stronger every day. 🚀 #JavaScript #WebDevelopment #CodingJourney #LearningToCode #Frontend #Programming
To view or add a comment, sign in
-
-
🚀 JavaScript deep dive — functions edition, but make it real Leveling up my JS skills — no shortcuts, just hands-on practice, brain twists, and a bit of fun. This time I focused on: ● IIFE & execution context ● Higher-Order Functions ● Currying ● Scope, hoisting & closures ● let / const & best practices 🛠 What I built in practice: ● curriedAdd() — sequential addition with currying ● curriedDomain() — building a full domain step by step ● modifyFunction() — higher-order function that changes behavior ● outerFunction() → innerFunction() → deepInnerFunction() — closures in action This homework really helped me feel how functions work in JavaScript — how data lives in scope, how closures remember values, and why currying is more than just syntax. 🔗 GitHub: https://lnkd.in/drUWuzbE Always learning, always experimenting. One function at a time 🚶♀️💻 🧛♂️ Night coding approved by Dracula.🧛♂️💻 #JavaScript #LearningByDoing #Currying #Closures #HigherOrderFunctions #Frontend #CodingJourney
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