JSFiddle - React, Tailwind, and code Playground
by Rob Lardy
JavaScript
var me = {
name: "Rob",
favoriteColor: "Red",
favoriteSaying: "Cpt my Cpt",
trophies: []
// speak: function(msg) {
// console.log(this.name +" says: " + this.favoriteSaying;
//};
me.speak = function(msg) {
console.log(this.name + " says: " + msg);
//ability to say something to the otehr person
}
me.speakTo = function(name, msg) {
//ability to say something to the other person
}
me.speak("Hello!");
me.trophies[me.trophies.length] = "Gold medal";
me.trophies[me.trophies.length] = "Person of the year";
me.trophies.push("Super Star");
me.trophies.unshift("Amazingly Beautiful Baby");
me.trophies.unshift("Better then all");
console.log(me.trophies);