Content Creation

Lorem ipsum dolor sit amet, consectetur quo adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo.

Design

Tutoring and Development

(function (window, document) {
'use strict';
class Salad {
    constructor(fruits, veggies,
                dairy, meat) {

        this._fruits = fruits;
        this._veggies = veggies;
        this._dairy = dairy;
        this._meat = meat;
    }

    set fruits (fruits) {
        _fruits = fruits;
    }
    get fruits () {
        return this._fruits;
    }

    set veggies (veggies) {
        _veggies = veggies;
    }
    get veggies () {
        return this._veggies;
    }

    set dairy (dairy) {
        _dairy = dairy;
    }
    get dairy () {
        return this._dairy;
    }

    set meat (meat) {
        _meat = meat;
    }
    get meat () {
        return this._meat;
    }

    get ingredients () {
        return {
            'fruits': this.fruits,
            'veggies': this.veggies,
            'dairy': this.dairy,
            'meat': this.meat
        }
    }
}

let fruits = ['apple', 'berry',
        'cherry'];

let veggies = ['lettuce',
        'spinach'];

let dairy = ['cheese'];
let meat = 'chicken';

let salad = new Salad(fruits,
veggies, dairy, meat);

console.log(salad.ingredients);

} (window, document));