Using the JavaScript lastIndexOf Array Method

preview_player
Показать описание
The 'lastIndexOf' array method behaves similarly to 'indexOf', except that it will find the last index of the array at which an element appears. Using this method instead of creating a loop and searching for a value yourself can save you time and make your code cleaner.
Рекомендации по теме