Undoing bizarre formatting choice.
Logic now plays itself properly and prints results to JavaScript Console.