2009-01-20から1日間の記事一覧
昨日のコードは動作しませんが、以下のコードはちゃんと動作します。 Array.prototype.each = function( proc, self ) { for ( var i=0; i<this.length; i++ ) proc.call( self, this[i], i, this ); } function main() { var stdout = document.getElementById( "out" ); ["mii","tora","shiro"].each( function(item) { stdout.innerHTML += item + "<br/>…</this.length;>