Home > @silence_zhpf/utils > HashMap > mapValue
此函数使用提供的函数将HashMap
对象的值映射到新数组。
Signature:
mapValue<R>(fn: (value: U, index: number, array: U[]) => R): R[];
Parameter | Type | Description |
---|---|---|
fn | (value: U, index: number, array: U[]) => R | 接受三个参数的函数:值的“值”、键的“索引”和键的整个“数组”。 |
Returns:
R[]
mapValue
方法返回一个值数组。