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?

要素数の取得

Posted at

.length

配列名や文字列変数名の後ろに.lengthと続けることで該当の配列・文字列の要素数を取得する事が出来ます。

この時、半角・全角どちらも同じ1文字として扱われます。
.lengthの表記方法はプログラム内のマジックナンバーを減らす事が出来ます。

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?