JSFiddle - React, Tailwind, and code Playground

by jamna

JavaScript

// Here we create an object representing the date of Christmas, 2007
// The variable xmas contains a reference to the object, not the object itself
var xmas = new Date(2007, 11, 25);
alert(xmas);
// When we copy by reference, we get a new reference to the original object
var solstice = xmas;  // Both variables now refer to the same object value
alert(solstice );