Completed Reverse Polish Notation implementation in JS.