Skip to content

Instantly share code, notes, and snippets.

View manjula-dube's full-sized avatar
🎯
Focusing

Manjula Subhashchandra Dube manjula-dube

🎯
Focusing
View GitHub Profile
@manjula-dube
manjula-dube / alternative.md
Created January 26, 2017 14:35 — forked from threepointone/alternative.md
list of things that don't do what they say they do

(also know as lies and/or alternative facts)

js

  • setImmediate - doesn't set anything immediately, waits for a tick before executing
  • setTimeout(fn, n) - never sets the timeout to exactly n
  • Math.random() - computers cannot generate random numbers
  • Promise - is a lie when rejected
  • Array.reduce - accumulates, does not reduce (via @sbmadhav)
@manjula-dube
manjula-dube / LinkedList.js
Created January 25, 2017 18:49 — forked from wesleyhales/LinkedList.js
JavaScript LinkedList Example
//I wanted a more elegant linkedlist example than the others, so purely for academic purposes I created one.
var LinkedList = function(e){
var that = {}, first, last;
that.push = function(value){
var node = new Node(value);
if(first == null){
first = last = node;