JSFiddle - React, Tailwind, and code Playground

by Cody Lindley

HTML

<script src="https://getfirebug.com/firebug-lite-debug.js"></script>
<!-- functional programming utility library -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.3.1/lodash.underscore.js"></script>
<!-- DOM & XHR utility -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<!-- Backbone.js -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js"></script>

CSS

iframe {
    height:263px !important;
}

JavaScript

var myModel = Backbone.Model.extend({
    /*the context of the initizlie function is set 
    to the instance object being created.*/
    
    //log the properties in this/instance
    initialize:function(){
        console.log(_.keys(this));
        console.log(_.keys(this.constructor.prototype)); //where you'll find name
    },
    name:'myModel'
});

 //create an instance, verify initialize is being called
new myModel;