我所拥有的只有7.23,为此我编写了以下代码:var shorter = str.substr(0,4);all.js?55:92 Uncaught TypeError: str.substr is not a function at HTMLSpanElement.dispatch (jquery.min.js:2)
function rev(s){return s.split("").reverse().join(""); },而使用更复杂的参数(如[s a & [b]] )或参数多态时,它会生成一个匿名函数: (.. s (substr a b))) (.. s (substr a))))
..。生成:function (s,a,b){ switch(arguments.length){ case 2: return s