Challenge: Extension Operators
Solidify your understanding of extension operators in this lesson.
We'll cover the following
Challenge #1
Implement extension
operator ‘-’ to reverse the items in the list names
for the code snippet below.
List<String> namesList = ['Priyanka', 'Tyagi', 'Shweta', 'Singh'];
The -namesList
should reverse the list like below:
['Singh', 'Shweta', 'Tyagi', 'Priyanka']
Get hands-on with 1400+ tech skills courses.