Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
Enter a String: <input type="text" id="uncoded" >
<input type="button" value="cipher" onclick="cypher(); return false;">
Encrypted String: <input type="text" id="coded" >
</body>
</html>
 
function cypher() {
  var coded = document.getElementById('coded');
  var uncoded = document.getElementById('uncoded');
  coded.value = uncoded
    .value
    .split('')
    .map(function (char) {
      return char + randomLetter() + randomLetter();
    })
    .join('');
}
function randomLetter() {
  return Math.random().toString(36).replace(/[^a-zA-Z]/gi, '')[0];
}
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers