JSFiddle - React, Tailwind, and code Playground

by Jessie Lau

JavaScript

function setName(obj) {
obj.name = “Nicholas”;
}
var person = new Object();
setName(person); // after being invoked this function, which is destroyed, so there is an error in console???
console.log(person.name);