JSFiddle - React, Tailwind, and code Playground
by Ryan Morris
HTML
<h1>Hello</h1>
JavaScript
// Declare a variable "myArray" and reference an array of 3 values (colors?)
// Declare a variable "me" and reference an object with 2 properties, "name", which is your name, and "toString", which is a function that returns the name value.
// Create a function that returns either "elf" or "dwarf", based on a random number
// If less than 0.5, return "elf"
// If more than or equal to 0.5, return "dwarf"
// Create a function that iterates over your array from above, logging each value to the console
// Create a new object, "you", that uses "me", your object from above, as its prototype
// "call" your "toString" function from "me" object in the context of "you"