escape() method in JavaScript

var newString = escape("A & B C");
    document.write(newString);