Reversing a JavaScript String
JavaScript strings do not have in place mutator methods like arrays do: var arr = [ 'f', 'o', 'o' ]; arr.reverse(); arr; // Array [ 'o', 'o', 'f' ]; Since strings are immutable, we need a hack to accomplish the above with a string: var str = 'bar'; str.split('')...