console.log("Fruits");
Fruits
var msg = "I love fruits";
console.log(msg);
I love fruits
function Fruit(name , color) {
    this.name = name;
    this.color = color;
    this.role = "";
}

Fruit.prototype.setRole = function(role) {
    this.role = role;
}

Fruit.prototype.toJSON = function() {
    const obj = {name: this.name, color: this.color};
    const json = JSON.stringify(obj);
    return json;
}

var x = new Fruit("Apple", "red");
logItType(x);
logItType(x.toJSON());

scrollX.setRole("x"); 
logItType(x); 
logItType(x.toJSON());