Teaching Newbies since 2014

kauress

  • Home
  • Javascript ❤
    • JavaScript
    • Node.js
  • WebDev Tuts
  • screencasts
  • Resources
  • VR & AR
  • Contact
  • Github
  • Twitter
  • YouTube
  • RSS
  • C++
You are here: Home / Archives for interviews

August 15, 2020 by: Kauress

Deep and shallow copying in JavaScript – part 1

Copying objects with shallow and deep copies Primitive values such as strings, and numbers are copied by value, whereas objects are copied by reference. What do we mean by this? The following code example will explain this practically: let num1 = 10; let num2 = num1; num1 = 6; console.log(num2); //10 The value of num1 which is the number 10 is assigned to the variable

[ Read More ]

Copyright © 2021 ·Kauress