Skip to content
Advertisement

Find the position of lastIndexOf a List that start with a certain character in kotlin/Java

JavaScript

How do I write a function to get the position of starting with 2X:XX?

How can I mix lastIndexOf() and startsWith()?

Advertisement

Answer

You can use normal for-loops, i.e.

JavaScript

This will return the index of the last string in the list starting with 2.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement