Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

rotate13 text in javascript

const rot13Deg = (string) => {
  var a = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
  var b = "nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM";
  const newText = string.replace(/[a-z]/gi, (c) => b[a.indexOf(c)]);
  return newText
};
Source by www.textbotonline.com #
 
PREVIOUS NEXT
Tagged: #text #javascript
ADD COMMENT
Topic
Name
3+2 =