How to Find the Index of a Checked Row in a Table Using jQuery

I’ve been working on a web app for work recently (not my forte), so I’ve been learning a lot of jQuery recently and thought I’d share a little snippet that took me far too long to write:

Basically, what the snippet does, is scan through the table I have on my page and return an array of every row thats had a checkbox checked in. Super simple, but with my limited knowledge incredibly frustrating. Anyway, I hope this helps anyone else that’s had the same issue.