JS string reversed instance code

VAR Reverse = function (STR) {var newstr = ”, i = str.length; for (; i> = 0; I- -) {newsTR + = Str.Charat (i);} return newstr;}; Reverse (‘Abcde’)

VAR Reverse = Function (STR) {Return Str.Split (”). Reverse (). Join (‘);};
3. (Simwork 2)

VAR Reverse = Function (STR) {var stack = []; // Generate a stack for (var len = str.length , i = len; i> = 0; I -) {stack.push (STR [i]);} return stack.join (”);};

The above is the instance code of the JS string reversed by Xiaobian, I hope that everyone can help, if you have any questions, please leave a message, Xiaobian will reply to everyone in time. Thank you very much for your support of Tumi Cloud Website!

© Copyright Notice
Just support it if you like
comment Grab the couch

Please log in to comment