Counter Function

by Ryan Morris

JavaScript

/**
 * Counter Function
 * 
 * Make a function that can keep track of a count value
 * And allows you to increment or decrement it while retaining the value
 *
 * The value starts at 0 and will increment by 1 
 *
 * count.value(); // 0 -- starts at 
 * count.up(); // 1
 * count.up(); // 2
 * count.down(); // 1
 * count.value(); // 1
 *
 */