Anonymous user
Array length: Difference between revisions
reformatted as a draft task and adding proper headings, moving the see also section up and not making that a heading.
No edit summary |
(reformatted as a draft task and adding proper headings, moving the see also section up and not making that a heading.) |
||
Line 1:
{{draft task}}
Determine the amount of elements in an array.
<br>As an example use an array holding the strings 'apple' and 'orange'.
== JavaScript ==▼
* [[String length]]▼
<lang javascript>console.log(['apple', 'orange'].length);</lang>
==
<lang php>print count(['apple', 'orange']); // Returns 2</lang>
==
<lang sql>SELECT COUNT() FROM (VALUES ('apple'),('orange'));</lang>
▲== See also ==
▲* [[String length]]
|