A Last In First Out (stack) implementation in javascript