JAVASCRIPT

Function

  • XMLHttpRequest

var req=new XMLHttpRequest(); 
req.open('GET','http://localhost/something');
req.send(null)
  • ROT13

function rot13(s)
 {
    return (s ? s : this).split('').map(function(_)
     {
        if (!_.match(/[A-Za-z]/)) return _;
        c = Math.floor(_.charCodeAt(0) / 97);
        k = (_.toLowerCase().charCodeAt(0) - 83) % 26 || 26;
        return String.fromCharCode(k + ((c == 0) ? 64 : 96));
     }).join('');
 }
 //rot13("Hello World");
  • Base64

//Convert to Base64
btoa("hello world");

//From Base64
atob("something==")

Last updated