JSFiddle - React, Tailwind, and code Playground

by DMSChris

JavaScript

var coffee = {
	name: "frappuccino",
	color: "black",
	temp: "hot",
	creme: false,
	sugar: false,
	size: 20,
	coffeeInfo: function() {
		console.log("My Coffee is " + this.color + ", " + this.size +"oz, and is also " + this.temp + ".");
		console.log("Does it have creme? " + this.creme);
		console.log("Does it have sugar? " + this.sugar);
	}
}

var chrisPena = {
	firstName: "Chris",
	lastName: "Pena",
	age: 23,
	city: "Houston",
	state: "Texas",
	drinking: coffee,
	hobbies: [" Programming", "Picking up Chicks", "Partying"],
	myInfo: function() {
		console.log("My hobbies include" + this.hobbies[0] + ", " + this.hobbies[1] + ", " + this.hobbies[2]);
	}
}

var starbucks = Object.create(coffee);

starbucks.sugar = true;
starbucks.creme = true;
starbucks.size = 36;

starbucks.coffeeInfo();