MV Conditions check multiple actors

Hey. Is there a way for condition event to check multiple actors. For example, IF actors with ID 50,51,52,53 have skill "X"?
Converting actor ID to variables is not a good solution as I'll need to keep creating variables as I add actors which is messy.
Is there a script line like Actors.ID(50,51,52,53,54) which would work with "Actors.ID(50,51,52,53,54) any of them have skill "X" == true?".
You can loop through the actor IDs, e.g. Conditional Branch > Script:
JavaScript:
[50,51,52,53].some(function(id) { return $gameActors.actor(id).hasSkill(123); })
I believe this will return true iff at least one of those actors (ID 50, 51, 52, or 53) has learned skill ID 123. Change the numbers as needed, of course. 🙏

Here I've used the array method some:

Original thread: https://forums.rpgmakerweb.com/threads/conditions-check-multiple-actors.127440/