console.log("yippee");
yippee
var msg = "in this essay i will analyze the rhetorical appeals of the hit song mask by dream";
console.log(msg);
in this essay i will analyze the rhetorical appeals of the hit song mask by dream
function logIt(output) {
    console.log(output);
}
logIt(msg);
in this essay i will analyze the rhetorical appeals of the hit song mask by dream
console.log("Reuse of logIT")
logIt("hello welcome to my essay");
logIt(2022)
Reuse of logIT
hello welcome to my essay
2022
function logItType(output) {
    console.log(typeof output, ";", output);
}
console.log("looking at who asked")
logItType("no one"); // String
logItType(0);    // Number
logItType([0, 0, 0]);
looking at who asked
string ; no one
number ; 0
object ; [ 0, 0, 0 ]
function Person(name, slayrate, classOf) {
    this.name = name;
    this.slayrate = slayrate;
    this.classOf = class0f;
    this.role = "";
}

// define a setter for role in Person data
Person.prototype.setRole = function(role) {
    this.role = role;
}

// define a JSON conversion "method" associated with Person
Person.prototype.toJSON = function() {
    const obj = {name: this.name, slayrate: this.slayrate, class0f: this.classOf, role: this.role};
    const json = JSON.stringify(obj);
    return json;
}

// make a new Person and assign to variable teacher
var slayer = new Person("sabine", "1million", 2024);  // object type is easy to work with in JavaScript
logItType(slayer);  // before role
logItType(slayer.toJSON());  // ok to do this even though role is not yet defined

// output of Object and JSON/string associated with Teacher
slayer.setRole("slayer");   // set the role
logItType(slayer); 
logItType(slayer.toJSON());
evalmachine.<anonymous>:4
    this.classOf = class0f;
                   ^

ReferenceError: class0f is not defined
    at new Person (evalmachine.<anonymous>:4:20)
    at evalmachine.<anonymous>:21:14
    at ContextifyScript.Script.runInThisContext (vm.js:25:33)
    at Object.runInThisContext (vm.js:97:38)
    at run ([eval]:1020:15)
    at onRunRequest ([eval]:864:18)
    at onMessage ([eval]:828:13)
    at emitTwo (events.js:106:13)
    at process.emit (events.js:191:7)
    at process.nextTick (internal/child_process.js:758:12)