JSFiddle - React, Tailwind, and code Playground

by zainshaikh

JavaScript

function ProgrammingModel(_name, _concept) {
    this.name = _name;
    this.concept = _concept
}

function IConcept() {}

function ObjectOrientedConcept() {
    this.definitions = {
        basic: 'this concept is represented as objects which is the composition of nouns and verbs. Nouns are declared as properties of object and verbs are declared as methods of object.',

        object: 'each object is used to store different kind of data and to perform some data specific operations.',
        nouns: 'properties of a class are used to maintain state of an object.',
        verbs: 'methods of a class define behaviour of an object.'
    }

    this.object = {
        noun: 'noun',
        verb: function () {
            alert('verb');
        }
    };
    
    
    this.encapsulation = {
        definition : 'encapsulation is an information hiding mechanism. the internal representation of an object is generally hidden from from view of outside.',
        acheived: 'via access modifiers, e.g. public, private etc.'
    }

}

var concept = new ObjectOrientedConcept();
var model = new ProgrammingModel('OOP', concept);


log(model)

function log(obj) {
    window.console && window.console.log(obj);
}