Vinyl
Preparing search index...
@amzn/vinyl-util
getElementOrDefault
Function getElementOrDefault
getElementOrDefault
<
T
,
V
>
(
array
:
ArrayLike
<
T
>
,
index
:
number
,
defaultValue
:
V
,
)
:
T
|
V
Gets the element in the ArrayLike at the given index, or returns the provided default value.
Type Parameters
T
V
Parameters
array
:
ArrayLike
<
T
>
index
:
number
defaultValue
:
V
Returns
T
|
V
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Vinyl
Loading...
Gets the element in the ArrayLike at the given index, or returns the provided default value.