JSFiddle

  • Use cases for Array.map

    Some interesting way to use Array.map on strings and DOM

    var result;
    var resultElement = document.querySelectorAll('#result')[0];
    
    var log = function( content) {
    	resultElement.innerHTML += typeof content + ': ' + content + "\n";
    }
    
    // run Array ...
  • Loading public JSFiddles

    This example uses jQuery for convenience

    var url = 'https://jsfiddle.net/api/user/stanislavcmakal/demo/list.json?limit=10&callback=';
    var promise;
    
    
    var processData = function(data) {
    	var ...
  • Wind Turbines in CSS #14 is the latest revision

    Just messing with CSS

    // Get the current speed of wind in Tokyo
    
    var defaultSpeed = 3;
    var speed = defaultSpeed;
    var promise;
    // var APIKey = '5831532a2d7e5ed8053f6c11d0923535';
    // var ...
  • Object Iterator

    A simple array iterator taken from Mozilla site, could be useful

    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators
    function makeIterator(array){
        var nextIndex = 0;
        
        return {
           next: function(){
               return ...
  • 1
  • 2