JSFiddle

  • View Unicode Characters

    Iterates various unicode characters.

    let x = 0,
      paused = false,
      increment = 0;
    const div = document.getElementById('codes'),
      button10 = document.getElementById('plus10'),
      button100 = document.getElementById('plus100 ...
  • Proxy Polyfill Data-Binding

    How to implement data-binding with the Proxy polyfill

    (function() {
    
      function observe(o, fn) {
        return new Proxy(o, {
          set(target, property, value) {
            fn(property, value);
            target[property] = value;
          },
        })
      }
    
      const ...
  • Vanilla.js Data-Binding

    How to implement data-binding with plain old JavaScript

    (function() {
    
      const inpFirstName = document.getElementById('firstName'),
        inpLastName = document.getElementById('lastName'),
        inpAge = document.getElementById('age'),
        pOutput = document.getElementById('output'),
        btnReset = document ...
  • Compression/Decompression

    Example of compression and decompression in JavaScript

    // algorithm basically uses a frequency encoding and builds a tree "on the fly." 
    // the text is processed as pairs that ...
  • Primitives vs. Objects

    JavaScript primitives versus objects, explained via code

    (function () {
    
    	// simple function that, well, does something to/with something passed to it 
    	const doSomething = (payload, fn) => { fn(payload); };
      
      // here ...
  • micro-locator Example #1 is the latest revision

    Example of using the micro-locator microservices locator package.

    (function(loc) {
    
      let list = document.getElementById('myList'),
        addItem = text => {
          let li = document.createElement('li');
          li.innerHTML = text;
          list.appendChild(li ...
  • 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 ...