Lab 28

Wei Jian Zhen

12/24/2019

JavaScript refrences are descriptions of methods and properties of all JavaScript objects. JavaScript copying is used to assign a already present JavaScript object to a new part of the code without changing anytihng about the object. To see this, open your console menu via one of these methods: https://www.wickedlysmart.com/hfjsconsole/ depending on your browser and Operating System that you are using. Then type in console.log(); into the console. Inside the parentheses (), type in players, team. That will most likely result in the console showing the array and number of strings in the array. That is our reference for now. Next type in console.log(team4);. That will probably show a name in the team. Now type in console.log(cap2);. The object of (cap2); has been copied from const cap2 = Object.assign({}, person, { number: 99, age: 12 }); inside the JavaScript file. Same goes to console.log(wes); in which the object has been copied from const players = ['Wes', 'Sarah', 'Ryan', 'Poppy']; inside the JavaScript and the value of the object has been changed without changing the the orignial object of const person = {name: 'Wes Bos',age: 80}; inside the JavaScript.