79111407

Date: 2024-10-21 19:03:21
Score: 1
Natty:
Report link

This may not be the best approach, but I think it might work, considering the code provided:

var jpgCount = 0

while let file = files?.nextObject() as? String {
    if file.hasSuffix(".jpg") || file.hasSuffix(".jpeg") {
        jpgCount += 1
        print(file)
    }
}

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Borgim