phaser
Version:
A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers from the team at Phaser Studio Inc.
24 lines (21 loc) • 612 B
JavaScript
/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2025 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* Takes the given string and reverses it, returning the reversed string.
* For example if given the string `Atari 520ST` it would return `TS025 iratA`.
*
* @function Phaser.Utils.String.Reverse
* @since 3.0.0
*
* @param {string} string - The string to be reversed.
*
* @return {string} The reversed string.
*/
var Reverse = function (string)
{
return string.split('').reverse().join('');
};
module.exports = Reverse;