Xlune::Tumblr

2009.05.19 13:32
String.prototype.cmabrigde = function() { return this.split(’ ‘).map(function(w) { var ws = w.split(”); var l = ws.pop(); return (ws.shift() || ”) + (ws.length ? ws.sort(Math.random).join(”) : ”) + l; }).join(’ ‘); }; -

流行りのケブンリッジ関数 - JavaScript 編 - IT戦記

※文章(文節)の先頭と末尾の文字が合っていれば、間の文字の並び順はバラバラでも、正しい文として読める。

Page 1 of 1