Created
April 22, 2015 01:05
-
-
Save RyoSugimoto/a4778958f5590df2325e to your computer and use it in GitHub Desktop.
オブジェクトのプロパティ数を取得する。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getObjectLength = function (obj) { | |
var a, l = 0; | |
for (a in obj) { | |
l++; | |
} | |
return l; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment