Array.values
Array.values
Function
Returns a shallow copy of the array.
Syntax
array.values()
Parameters
No parameters.
Return value
| Type | Description |
|---|---|
| Array | Returns the new array value. |
Example
items = ['a', 'b'] result = items.values() // Output: ["a","b"] print result
Notes
- Reference type elements still maintain reference semantics.