NA +91-8727899942 thecoderjob@gmail.com

CHAPTER - 2

Copy by reference example in object || javascript

Here's a simple example to illustrate copy by reference with objects in JavaScript.

These copies are not deep copies, meaning that if the original object contains nested objects,

changes to the nested objects will still be reflected in both the original and copied objects.

Here's is the Code !!

// Neel.B
const employee = {
	name : "Neel",
	email : "neelbhardwaj97@gmail.com"
}
const newEmployee = employee

newEmployee.name = "mani"

console.log(employee.name) // output : mani

Chapter 1

Here is the example of how promise work in javascript.

Previous chapter

Chapter 3

Get highest number in the array || javascript

Next chapter

Get In Touch

NA

thecoderjob@gmail.com

+91-8727899942

Popular Links

© www.thecoderjob.com. All Rights Reserved.               Designed by HTML Codex