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·27 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
Bhavesh Nandavebhaveshnandave.hashnode.dev·Jun 14, 2024Shallow Copy & Deep Copy in JavascriptTom and Jerry are best friends. They have a big math exam coming up. Tom studied hard and is ready, but Jerry didn't study and decides to copy Tom's answers. Shallow Copy: A Quick Cheat Scenario: During the exam,Jerry copies Tom’s answers and also ...DiscussReference vs. Value
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·49 readsData Duplication
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
vishal singhvishal21121.hashnode.dev·Dec 19, 2023Shallow copy vs Deep copyWhen dealing with arrays and objects in JavaScript, it is often necessary to create copies of these structures. Since both arrays and objects are mutable, understanding the implications of modifying a copied array or object on the original is crucial...DiscussJavaScript# shallow copy vs Deep copy
Utkarsh Dangarhutkarshdangarh.hashnode.dev·Oct 20, 2023Shallow Copy Vs Deep CopyIntroduction In programming, the concepts of deep copy and shallow copy are not limited to a single language but are essential for data manipulation in various programming languages, including JavaScript. These concepts are fundamental to understandi...DiscussJavaScript