List.map method

Calls the specified callback function on each element of a list, and returns an array that contains the results.

Syntax

var array = list.map(callback, thisArg);

Parameters

  • callback
    Type: Function

    A function that accepts up to three arguments. The function is called for each element in the list.

  • thisArg
    Type: Object

    n object to which the this keyword can refer in the callback function. If thisArg is omitted, undefined is used.

Return value

Type: Array

An array containing the result of calling the callback function on each element in the list.

Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.Binding

See also

List