Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

caeser psypher javascript

function cipherRot13(str) {
  str = str.toUpperCase();
  return str.replace(/[A-Z]/g, rot13);

  function rot13(correspondance) {
    const charCode = correspondance.charCodeAt();
    //A = 65, Z = 90
    return String.fromCharCode(
            ((charCode + 13) <= 90) ? charCode + 13
                                    : (charCode + 13) % 90 + 64
           );
    
  }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to wait for dom in javascript 
Javascript :: dédoublé un tableau et supprimé les doublons 
Javascript :: electron frameless Draggable move 
Javascript :: chrome extension sendmessage await until getdata 
Javascript :: filter-vs-map-reactjs-and-jsx 
Javascript :: how to add array of object in class in javascript 
Javascript :: links 
Javascript :: loop through json object jquery 
Javascript :: print array elements in new line javascript 
Javascript :: javascript perms 
Javascript :: react native Stack Navigation Prop unused variable 
Javascript :: firebase iterate object 
Javascript :: how to use mixed quotes in a sentence in js 
Javascript :: javascript element.children.forEach not working 
Javascript :: trie node pseudocode 
Javascript :: open each image on its own modal page 
Javascript :: ionic react exit app 
Javascript :: nuxt js set background color of body 
Javascript :: nodejs s3 read 
Javascript :: javascript firebase kicks out current user 
Javascript :: var = " "; 
Javascript :: node_modules edux-sagaesindex.js 
Javascript :: Easiest way to create a form data object with Form Selector 
Javascript :: jstree get not disabled nodes 
Javascript :: javascript channel flutter inappWebview 
Javascript :: js particles without plugin 
Javascript :: how to make a dot function javascript 
Javascript :: JavaScript code to convert amount in words 
Javascript :: rechart graph 
Javascript :: How to Compare Strings Using localeCompare 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =