791-custom-sort-string

DevGod needs to write a blog entry for this problem!
/**
 * @param {string} order
 * @param {string} s
 * @return {string}
 */
var customSortString = function(order, s) {
    return s.split("").sort(
        function(a,b){
            return order.indexOf(a)-order.indexOf(b);
        }
    ).join("");
};