Would you like to clone this notebook?

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

Cancel

Copy-by-Reference Demo

node v4.9.1
version: master
endpointsharetweet
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);
Loading…

no comments

    sign in to comment