How are you getting to your Yahoo Mail on the iPad and iPhone? There are three ways that I am somewhat familiar with.
The Mail app.
Yahoo Mail app (iPhone only)
Yahoo webmail (via Safari)
Mail:
You can go tot he Spam folder by tapping the Mailboxes button at the top left of the email list, then tapping on the Yahoo account in the Accounts list (not the Inbox list). The folder will be named Junk, not Spam, but it is the same place. Unfortunately you can only delete the emails one by one, or choose Edit and select each then delete. There is no way to mass delete them with one or two taps.
Yahoo Mail app on the iPhone:
I'm guessing this is what you are using already. In case not, you select the Spam folder from the list, select one email, which brings up a tool bar at the bottom, tap the check box there to select all, then delete. I'm not supper familiar with the app, so my description may be a bit off, or there may be a better way to do it.
Yahoo Webmail:
Works on both the iPhone and iPad: You get there by opening Safari and navigating to Yahoo Mail just as you would on a computer. Or use a bookmark if you've got one. This is the easiest method to quickly delete the Spam folder. If there is anything in the folder there will be a trashcan icon next to it. Tap this to delete the unsightly Spam without even looking at it.
I hope one of these will help you in your quest to smite spam in all it's forms.