split/join – convert a string to array and back. ![]() reverse() – reverses the array in-place, then returns it.sort(func) – sorts the array in-place, then returns it.map(func) – creates a new array from results of calling func for every element.forEach(func) – calls func for every element, does not return anything.findIndex is like find, but returns the index instead of a value.find/filter(func) – filter elements through the function, return first/all values that make it return true.includes(value) – returns true if the array has value, otherwise false.indexOf/lastIndexOf(item, pos) – look for item starting from position pos, return the index or -1 if not found. ![]() If any of items is an array, then its elements are taken.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |