Difference between revisions of "Values"
Jump to navigation
Jump to search
ZachStrout (talk | contribs) (Created page with "<c>values</c> returns the values of a dictionary, or the characters of a string.(Returns any other value as-is.) See also: Indexes === Arguments === {| class="wikitable" |-...") |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <c>values</c> returns the values of a | + | <c>values</c> returns the values of a [[map]], or the characters of a [[string]]. (Returns any other value as-is.) |
See also: Indexes | See also: Indexes | ||
Line 17: | Line 17: | ||
== Example == | == Example == | ||
− | <ms>"abc".values | + | <ms> |
+ | "abc".values // returns ["a", "b", "c"] | ||
+ | {"one": 1, "two": 2, "three": 3}.values // returns [1, 2, 3] | ||
+ | </ms> | ||
[[Category:Intrinsic Functions]] | [[Category:Intrinsic Functions]] | ||
− | |||
[[Category:String Methods]] | [[Category:String Methods]] | ||
[[Category:Map Methods]] | [[Category:Map Methods]] | ||
− |
Latest revision as of 21:52, 26 October 2022
values
returns the values of a map, or the characters of a string. (Returns any other value as-is.)
See also: Indexes
Arguments
Parameter Name | Default Value | Meaning |
---|---|---|
self | any | object to get the values of |
Usage Notes
values
may be called with function syntax or dot syntax.
Example
"abc".values // returns ["a", "b", "c"]
{"one": 1, "two": 2, "three": 3}.values // returns [1, 2, 3]