0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

JavaScriptで連想配列の件数を調べる(オブジェクトのlength件数を取得する)

Last updated at Posted at 2018-10-01

連想配列の件数

ピッチ見たく連想配列のcountを取れないかなとお嘆きの貴兄に捧ぐ。

var obj = { a:1, b:2 };
var count = Object.keys( obj ).length;

こうするとcountに件数が取れるっす。
今日気づいたなり。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?