Lim Woojaejaylog.hashnode.dev·Dec 15, 2024[CS Fundamentals] Deep Dive into Shallow Copy vs. Deep Copy. Explained in PythonIntroduction Before going in, you should know the difference between mutable and immutable types in python. You can have a look at my article: [CS Fundamentals] Mutable vs. Immutable. You don’t need to care about shallow copy and deep copy for immuta...DiscussCS fundamentalsshallowCopy
Bharat Kumarbharat2044.hashnode.dev·Oct 6, 2024How to Copy Objects in JavaScript: What Are Shallow and Deep Copies and How Can You Achieve Them?Copying Objects in JavaScript: Shallow and Deep Copy Explained In JavaScript, when dealing with objects, it is often necessary to create copies of an object. However, copying objects isn’t as simple as copying primitive data types like numbers or str...Discuss·1 likeJavaScript
Rohit Rairohitrai.hashnode.dev·Aug 23, 2024Understanding Deep Copy vs. Shallow Copy in Python: Key Differences and Practical ExamplesDifference between deep copy and shallow copy in Python Introduction In Python programming, the concept of copying objects is crucial, especially when dealing with mutable data types like lists and dictionaries. Understanding how copying works and th...Discuss·28 readsPython
Avinash Dewanganavidew.hashnode.dev·Aug 6, 2024How to create Shallow and Deep copy in JavaScript//create Object let object = { name : "ravi", age : "36" } // shallow copy let ShallowCopy = object //ShallowCopy changes age 35 ShallowCopy.age=35 // print shallow copy and object reflect both object console.log("ShallowcCopy : ", ShallowCopy) conso...DiscussDeepCopy
Niharika Gurnaniniharikagurnani.hashnode.dev·May 30, 2024Deep Copy vs Shallow copy"Knowingly or unknowingly, since we all know JS in unpredictable, we end up modifying the existing data in JS objects / variables. To prevent this, we must ensure to safely copy the data." By simply using the = (assignment) operator, we end up copyin...Discuss·28 readsDeepCopy
Behnam Amiribehnam-amiri.hashnode.dev·May 20, 2024From Shallow to Deep: A Comprehensive Guide to JavaScript Data Duplication for Arrays and ObjectsIntroduction Let's quickly review data types in JavaScript. In JavaScript, data types are broadly categorized into two categories: primitive and non-primitive.Primitive data types are the predefined data types provided by the JavaScript language. The...Discuss·1 like·51 readsData Duplication
Arturcode-with-arthur.hashnode.dev·May 9, 2024The Importance of Immutability in Programming: Why It Matters?A lot of folks starting out with JavaScript and programming, in general, often encounter the idea of immutability and its importance. But why is it so crucial? And why does it matter? What exactly is immutability and an immutable value? Immutable mea...DiscussProgramming Best Practices
Manas Upadhyaymanasupadhyay.hashnode.dev·Mar 21, 2024Shallow Copy vs Deep CopyWhen working with objects and arrays in JavaScript, understanding the concepts of shallow copy and deep copy is crucial for effective programming and avoiding unexpected bugs. In this article, we'll delve into what shallow copy and deep copy mean, th...Discuss·13 likes·58 readsJavaScriptJavaScript
Saurabh vermaedunode.hashnode.dev·Mar 3, 2024Deep Copy and Shallow CopyOne of the most important concept in java-script When you are dealing with java-script objects. understanding the concepts of shallow copy and deep copy is crucial to avoid unintended side effects and unexpected behavior in your code. 1. Copying Prim...Discuss·3 likesJavaScript
Jaydev Jadavtechjaydev.hashnode.dev·Feb 11, 2024JavaScript's Object Copy Puzzle: Shallow vs Deep?In the JavaScript world, you often experience some strange behaviour. One such quirk that frequently confounds developers is the Object Copy Problem. In the wild and woolly realm of JavaScript, you may encounter some rather peculiar phenomena. Pictur...Discuss·10 likes·73 readsJavascriptJavaScript