Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.


Copy-by-Reference Demo

node v4.9.1
version: master
const array = [1,2,3] let newArray = array; newArray.push(4); console.log("array", array); console.log("newArray", newArray);
const object = { a: 1, b: 2 } let newObject = object; newObject.a = 100; console.log("object", object); console.log("newObject", newObject);

no comments

    sign in to comment