src/core/encode.js
/**
 * Encode
 *
 * Function that reverses any string given.
 *
 * @param {string} string String to be encoded
 */
Encode
Function that reverses any string given.

@param {string} string String to be encoded
Encode Function that reverses any string given . @param { string } string String to be encoded
function encode(string) {
  if (string === "") {
    return "";
  }
  return string
    .split("")
    .reverse()
    .join("");
}
function encode ( string ) { if ( string === "" ) { return "" ; } return string . split ( "" ) . reverse ( ) . join ( "" ) ; }
Encode
 Function that reverses any string given.
Encode Function that reverses any string given .