Computer Science, asked by ashishnegi4139, 1 year ago

How to print the content of JavaScript object?


krishnavignesh07: give me brainliest plzzzzzz

Answers

Answered by krishnavignesh07
0

Clone the object before printing

function log_them() {

var p = {

'fname' : 'Foo',

'lname' : 'Bar'

};

console. log("Before Change", JSON. parse(JSON. stringify(p)));

p["email"] = '[email protected]';

console. log("Acter Change", JSON. parse(JSON. stringify(p)));

hope give me brainliest


krishnavignesh07: give me brainliest plzzzzzz
krishnavignesh07: give me brainliest
krishnavignesh07: give me brainliest plzzzz
Similar questions