JSFiddle - React, Tailwind, and code Playground

by gonzalo123

HTML

<h1><a href="http://www.themelee.org"><span>The Melee</span></a></h1>

CSS

body {background-color:#fff}
h1 a {background:url(http://www.sonesu.com/wp-content/uploads/2011/02/themelee-logo.png) no-repeat 0 0; 
    width:130px; height:200px; display:block}
h1 span {display:none}

JavaScript

// Inicialmente escrito en CoffeeScript por @gonzalo123 mientras cenaba y veía el telediario
// Nos vemos mañana en Korta:
// themelee.org/post/11580408703/melee-node-js-html5-websockets-21-octubre
var Melee, melee, numeroDeAsistentes, numeroMinimoDeAsistentes;
Melee = (function() {
    function Melee(numeroMinimoDeAsistentes) {
        this.numeroMinimoDeAsistentes = numeroMinimoDeAsistentes;
        this.posponerCharla = function(numeroDeAsistentes) {
            if (numeroDeAsistentes < this.numeroMinimoDeAsistentes) {
                return true;
            } else {
                return false;
            }
        };
    }
    Melee.prototype.decideCon = function(numeroDeAsistentes) {
        if (this.posponerCharla(numeroDeAsistentes)) {
            return "Posponemos charla";
        } else {
            return "Seguimos con el plan";
        }
    };
    return Melee;
})();
numeroMinimoDeAsistentes = 10;
numeroDeAsistentes = 15;
melee = new Melee(numeroMinimoDeAsistentes);
alert(melee.decideCon(numeroDeAsistentes));