Javascript String randomAnagram()

Description

Javascript String randomAnagram()


String.prototype.randomAnagram = function () {
  return this.split('').sort(function () {
    return 0.5 - Math.random();
  }).join('');/*from   www  . j av a2  s.c  o  m*/
};



PreviousNext

Related