Iterating and Modifying Array Entries with - J Query

You need to loop over each element in an array and modify its value.


In this recipe, $.map() is iterating over the months array and returns the abbreviation (first three characters). The $.map() method takes an array and a callback method as arguments and iterates over each array element executing the callback as defined by the developer. The array entry will be updated with the return value of the callback.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

J Query Topics