(εã»âã»)з hasOwnProperty ã使ã£ã for in ã«ã¼ããã 20%ï½84% ä½ã³ã¹ããªããã¼ã±ã¼å¼ ã«ã¼ãã®ãç´¹ä»ã ãï½ Object.keys ã使ããkey ãåæãããã¨ã§ãhasOwnProperty ã使ã£ã for in ã«ã¼ããããéããªãã¾ãã var keys = Object.keys(obj), i = 0, iz = keys.length; for (; i < iz; ++i) { var key = keys[i]; var value = obj[key]; ... ãã³ããã¼ã¯ http://jsperf.com/perf-for-in-loop-vs-pre-enum-keys-for-loop/8 Browser for_in_hasOwnProperty loop uupaa-looper Chrome 16.0.912.77
{{#tags}}- {{label}}
{{/tags}}