Assuming that I have an array that looks like the one below:
["file1.java", "file32.js", "file44.java", "file4.html", "file15.js"]
I would like to filter out only the elements that end in ".java". Therefore I would like to somehow be able to search for the substring ".java" as I'm iterating through each element in my array. How do I go about doing this? Thank you