JavaScript TypedArray map() MethodThe JavaScript map() method form a new array creates a new typed array with the results of calling a provided function on every element in this typed array. NOTE: map() method does not change the actual array.Syntax:Parameters:Value(Required): The value of the current element. Index(Optional): The array index of the current element. arr(Optional): The array map() was called upon. ThisValue(Optional): A value to be passed to the function to be used as its "this" value. Return value:A new array. Browser Support:
Example 1JavaScript map() Method Test it NowOutput: 2,4,6 Example 2JavaScript map() Method Test it NowOutput: 10,1,3,5
Next TopicJavaScript TypedArray Object
|
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week