JSFiddle

  • RxJs Bifurcation Diagram

    Fractal using RxJs

    (function() {
    
      // based on the equation x{n + 1} = x{n} * r * (1.0 - x{n});
      // x represent a % of population ...
  • Angular Repeat Example

    Showing how to compare values for breaks

    (function (ng) {
    
    	function Ctrl() {
      	this.list = [], offset = 0, curDate = new Date();
        for (var x = 0; x < 20; x+=1) {
        	var ...
  • Turing Tape

    Example "busy bee" Turing machine

    (function() {
    
      var tape = Array.apply(null, new Array(100)).map(Number.prototype.valueOf, 0),
        head = 50,
        state,
        stateA,
        stateB,
        stateC ...
  • MVVM

    Implementation of MVVM in JavaScript

    (function() {
    
      "use strict";
    
      var view, viewModel, valueTemplate;
    
      valueTemplate = {
        configurable: false,
        enumerable: true,
        get: function() {
          return this._value;
        },
        set: function(val ...
  • MVC

    Implementation of MVC in JavaScript

    (function() {
    
    	"use strict";
    
      var model, view, controller;
    
    	// this is simply data and behavior. In this 
      // case a single property is ...
  • Bifurcation Diagram

    Chaos in JavaScript

    (function () {
        var c = document.getElementById("c"),
            ctx = c.getContext("2d"),
            w = c.width,
            h = c.height,
            st = 2 / w,
            imgArray ...
  • Plasma #18 is the latest revision

    TypeScript goes plasma

    const screenHeight: number = 200;
    const screenWidth: number = 320; 
    
    var requestAnimFrame = (callback) => 
         		  window.requestAnimationFrame(callback)       || 
                  window.webkitRequestAnimationFrame(callback) || 
                  window.mozRequestAnimationFrame(callback ...
  • What is This?

    Demonstration of This

    var obj1 = {
        foo: "this",
        bar: function () {
            return this.foo;
        }
    }, obj2 = {
        foo: "that",
        bar: obj1.bar
    },
    obj3 = {
        foo: "the other"
    };
    
    obj3 ...
  • Immediately Invoked Function Expression #56 is the latest revision

    Example of IIFE.

    (function (myDiv, setVal) {
        var x = 10;
        for (; x; x -= 1) {
            (function (y) {
                setTimeout(function () {
                	setVal(myDiv, y);
            	}, (10 - x) * 1000 ...
  • Closure Example #5 is the latest revision

    How closures and captures work

    for (x = 0; x < 10; x += 1) {
        setTimeout(function () {
            console.log(x);
        }, 0);
    }