Two Pointer Algorithm Javascript Playground