in place reverse algorithm using javascript code example Example: js revers string fucntion return str.split("").reverse().join("");